0 Replies Latest reply on Jan 11, 2013 8:41 AM by rzoller

    debug.xhtml on tomcat with XHTML

    rzoller

      Hi @ll,

       

      I've got a Seam 2.2.2 Final project set up with maven for tomcat 6. Everything works fine so far but now I want to use the seam debug page. This is my this is what I've got in my web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.5" 
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">      
          
          <!-- Seam -->
               
          <listener>              
              <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>        
          </listener>    
      
      
          <filter>
              <filter-name>Seam Filter</filter-name>
              <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
          </filter>
          
          <filter-mapping>
              <filter-name>Seam Filter</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>
          
          <servlet>
              <servlet-name>Seam Resource Servlet</servlet-name>
              <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
          </servlet>
          
          <servlet-mapping>
              <servlet-name>Seam Resource Servlet</servlet-name>
              <url-pattern>/seam/resource/*</url-pattern>
          </servlet-mapping>     
       
          <!-- 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>
          
          <servlet-mapping>              
              <servlet-name>Faces Servlet</servlet-name>              
              <url-pattern>*.xhtml</url-pattern>
          </servlet-mapping>
             
          <!-- JSF parameters -->
          
          <context-param>        
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>        
              <param-value>.xhtml</param-value>    
          </context-param>
          
          <context-param>        
              <param-name>facelets.DEVELOPMENT</param-name>        
              <param-value>true</param-value>    
          </context-param> 
          
          <context-param>
              <param-name>facelets.SKIP_COMMENTS</param-name>
              <param-value>true</param-value>
          </context-param> 
          
          <session-config>
              <session-timeout>10</session-timeout> 
          </session-config>
          
          <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.xhtml</welcome-file>
          </welcome-file-list>
      </web-app>
      
      

       

      I added the jboss-seam-debug-2.2.2.Final.jar to WEB-INF\lib and added this line to components.xml

       

      <core:init debug="true"/>
      

       

      So everything seems to be set up fine but when I try to open http://localhost:8080/context/debug.xhtml I always receive an 404 Error. When I'm changing

       

          <servlet-mapping>              
              <servlet-name>Faces Servlet</servlet-name>              
              <url-pattern>*.xhtml</url-pattern>
          </servlet-mapping>
      
      

       

      to

       

          <servlet-mapping>              
              <servlet-name>Faces Servlet</servlet-name>              
              <url-pattern>*.seam</url-pattern>
          </servlet-mapping>
      
      

       

      the seam debug page is displayed, but all other .xhtml files are not rendered by Faces Servlet.

       

      Any suggestions to get the seam debug page to work?

       

      René