Re: SEO URL supporting l10n/i18n with PrettyFaces

Splash Forums PrettyFaces Users SEO URL supporting l10n/i18n with PrettyFaces Re: SEO URL supporting l10n/i18n with PrettyFaces


Your hint regarding the trailing slash solves two issues at once.

  1. Now it works exacty as I want it :-).
  2. There is no reason for complains, regarding violation of the schema, by the IDE anymore.

Now the code it looks like this:

<!-- welcome -->

<url-mapping id="welcome">

<pattern value="/"/>

<view-id value="/pages/index.xhtml"/>


<!-- lang -->

<url-mapping id="lang">

<pattern value="/#{languageSelected : localeHandler.languageSelected}" />

<view-id value="/pages/index.xhtml"/>


<!-- company -->

<url-mapping parentId="lang" id="company">

<pattern value="/company"/>

<view-id value="/pages/company.xhtml"/>


<h:link value="Home"


<f:param name="languageSelected" value="#{localeHandler.languageSelected}"/>


<h:link value="Company"


<f:param name="languageSelected" value="#{localeHandler.languageSelected}"/>


Examples of the resulting URL are:




So far I equipped only some of the <h:link&#62 tags with the <f:param name="languageSelected" value="#{localeHandler.languageSelected}"/&#62 tag, for testing purpose. For sure, for all other’s, I will use auto-replace function of the IDE :-)

Regarding the URL mapping with PrettyFaces all works like I want it.

The next task for me will be to create a breadcrumb menu for this website, based on the method PrettyContext.getCurrentInstance().getRequestURL().

But now, so all work as I want it, in general, I ask myself, should I try the version using Rewrite as well?

Is there some more, regarding the URL mapping and creating a breadcrumb menu, that I could gain, against the effort to change my web app from using PrettyFaces to using Rewrite?