views:

25

answers:

1

Hi there, I am migrating an application from Struts2 to JSF2. In struts2 I had mapped most of the actions so that the same action returned different locale content depending on the URL. For example:

http://site.com/en/content.action http://site.com/es/content.action

The action returned the same JSP which showed spanish or english depending on the URL. With this approach I have "SEO" bookmarkable localized URLs.

Is there any approach for doing this with JSF2? If not, which is the recommended approach for making the same JSF (xhtml) show different locale content depending on a request parameter (?locale=en for example) I have solved it using a changeLocale method in a managed bean, which works OK, but as it uses Post, the pages are not SEO as cannot be crawled.

Thanks for any ideas/approach. Ignacio

A: 

I would suggest you to look at PrettyFaces

Any business knows how important Search Engine Optimization can be for sales. PrettyFaces allows SEO-friendly URLs, and improved customer experience. Give your site a uniform, well understood feeling, from the address bar to the buy button.

I have personally used this in one of my app.

in your case if i understood it correctly you can make something like

yourdomain.com/en/login
org.life.java