Skip to main content

alternatives to having /faces in the request URL

3 replies [Last post]
Joined: 2009-05-02

I'm asked to look into alternatives to having /faces (or whatever string used for in web.xml) in the request url that eventually invokes the FacesServlet, so if the request url is for example:

they want it to be:
and still have FacesServlet handle the request.

So, I added a Filter implementation to intercept the request and then add/append the required url-pattern to the request. BUT, they don't like that solution either.

Question is:
As FacesServlet is a uhh Servlet, how else can one achieve this requirement?

Thx for any feedback.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-05-02

Thank you both for sharing your thoughts. I have looked at the PrettyFaces solution and so far it seems that it addresses our needs...and then some.

Joined: 2010-07-11

i simple map the FacesServlet to *.html

so everything requested with *.html gets handled

this may work out for you

Message was edited by: moritzthielcke2

Lincoln Baxter, III

Mapping everything to .html will work (you need to map Faces Servlet to
"*.html" in web.xml in order to achieve this), but if you want control of
the URL (in addition to changing how files are accessed,) you might want
take a look at PrettyFaces - a URL-rewriting solution for JSF.

Let me know if you have any questions.


On Sun, Jul 11, 2010 at 1:29 PM, wrote:

> i simple map the FacesServlet to *.html
> so everything requested with *.html gets interpreted as jsf2
> this may work out for you
> [Message sent by forum member 'moritzthielcke2']
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Lincoln Baxter, III
"Keep it Simple"