I have a JSF2 application. I can access my application @ http://tvmteleshopping.com/faces/ui/manageProfile.xhtml
but when I use http://tvmteleshopping.com/ui/manageProfile.xhtml (without / faces /) this request is served by Apache not tomcat. Only static HTML content is displayed.
I use Apache to serve static HTML files and tomcat to serve * .xhtml files
My servlet mapping is fine: web.xml
<servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping>
My cp_jkmount.conf to redirect jsp and jsf files to tocat server.
<IfModule mod_jk.c> JkMount /*.jsp ajp13 JKMount /*.do ajp13 JKMount /servlet/* ajp13 JKMount /servlets/* ajp13 JKMount /*.xhtml ajp13 JKMount /ui/* ajp13 JKMount /ui/*.xhtml ajp13 JKMount /faces/* ajp13 JKMount /*.jsf ajp13 </IfModule>
I have two cp_jkmount.conf , one in / usr / local / apache / conf / userdata / std / 1 /myuser/mysite.com/cp_jkmount.conf
and one in / usr / local / apache / conf / userdata / stand / 2 /myuser/mysite.com/cp_jkmount.conf
And my both cp_jkmount are the same. I do not know why I have two cp_jkmount.conf in two different directories.
PS: my application works fine for those .xhtml files that are in the root folder http://tvmteleshopping.com/index.xhtml
for this i think my cp_jkmout.conf works fine. But for these .xhtml files behind the “ui” folder, this does not work.
Mohit saluja
source share