Note that the /faces/ is due to the mapping in web.xml
. this is a standard mapping for JSF, however you could also use extension mapping - i.e. .faces
at the end of the URL.
For example, in an application I have here this is in the web.xml file:
<servlet-mapping>
<servlet-name>Persistent Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
This is using IceFaces, however it will be similar for you with RichFaces. Yours will probably look like this: <url-pattern>/faces/*</url-pattern>
. If you change it to have *.faces
as above, your end URL will look like this:
http://localhost/WebApplication/folder1/page.faces
If you use that in conjunction with the answer that Peter Hilton gave about deploying as a root web application, your end URL will look something like this:
http://localhost/folder1/page.faces
Which is almost exactly what you wanted.