Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf urls

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34396
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to use a URL other than *.faces or /faces/* for a JSF page?
 
James Holmes
Author
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

You can change the mapping inside the "web.xml" file for your Web application. Notice below that I changed the mapping to "*.xyz".

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xyz</url-pattern>
</servlet-mapping>

Hope that helps,

-James
JSF Resources and Faces GUI tool
http://www.jamesholmes.com/JavaServerFaces/
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34396
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,
Yes, that helps. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic