Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 being served by Apache not tomcat. Any only static HTML content is rendered.

I am using Apache to serve static HTML files and tomcat for serving .xhtml files

My Servlet mapping (web.xml) is fine:

  <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 tomcat 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: first one in /usr/local/apache/conf/userdata/std/1/myuser/mysite.com/cp_jkmount.conf
and second one in /usr/local/apache/conf/userdata/std/2/myuser/mysite.com/cp_jkmount.conf

And my both cp_jkmount are same. I don't know why i do have two cp_jkmount.conf in two different directories.

P.S: my application is working fine for those .xhtml files which are in root folder http://tvmteleshopping.com/index.xhtml

For this I think my cp_jkmout.conf works fine. But for those .xhtml files behind /ui/ directory it doesn't work.

Further http://tvmteleshopping.com/faces/ui/manageProfile.jsf or http://tvmteleshopping.com/ui/manageProfile.jsf gives a 404 and it works fine locally.

share|improve this question
    
Have you looked at your apache and tomcat log files? –  Krist van Besien May 13 '13 at 7:53
    
logs seems fine to me...nothing specific to this issue.. –  Mohit Saluja May 13 '13 at 8:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.