yes, I use *.jsf. when a url http://localhost:8080/webapp/page.jsf is
called, it calls the jsp in webroot of your war file. I also personally
put this in my web.xml.....
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jspx</param-value>
</context-param>
This allows me to name all my JSF jsps xxxx.jspx and I can name all my
normal jsps(that are not for JSF) xxxxx.jsp. I tried to figure out how
I could use jsf in the url and in the file name in the war file, but it
seems that cannot be done right now(or I could not figure it out).
later,
dean
Legolas Woodland wrote:
There are two declaration in web.xml that i can not understand
these are :
<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>/faces/*</url-pattern>
</servlet-mapping>
I just can not understand , in some places they set another
url-pattern , for example :
<url-pattern>*.faces</url-pattern>
and thier application works file.
but for me with the first url-mapping , i should navigate to
http://localhost:8080/testApp/faces/index.jsp to works
so my understanding is that :
when i navigate to that url , the pattern matches and filter applies
to my request.
but when people uses *.faces in url-pattern , how they navigate to jsp
pages ?
should they change the file extensions to use jsf pages , or there is
some other triks ?
Thank you