Re: URL rewriting with PrettyFaces, URLMapping and pretty:link

Splash Forums PrettyFaces Users URL rewriting with PrettyFaces, URLMapping and pretty:link Re: URL rewriting with PrettyFaces, URLMapping and pretty:link

#22898

You can try an approach like this:

public class BundleTricksProvider extends HttpConfigurationProvider {

@Override
public Configuration getConfiguration(ServletContext context) {
return ConfigurationBuilder.begin()
// Locale Switch
.addRule(Join.path("/{locale}/{page}.html").to("/{page}.xhtml")
.where("page").matches(".*")
.where("locale").bindsTo(PhaseBinding.to(El.property("#{languageSwitch.localeCode}")).after(PhaseId.RESTORE_VIEW)));
}

@Override
public int priority() {
return 10;
}
}

From this article (near the bottom) – http://blog.eisele.net/2012/08/resource-bundle-tricks-and-best.html