5 Replies Latest reply on Sep 29, 2009 4:55 AM by Sachin Parnami

    weired problem HTTP Status 404 home.seam no available

    Sachin Parnami Newbie

      Hi All,


      I might have messed up with the settings in my existing application.


      Problem here is when ever i hit my context-root which is abc-web i get home.seam not find 404 response.
      
      where as when i change abc-web/home.seam to abc-web/home.jsf everything works as expected.
      
      where as my FacesServlet mapping in web.xml are mentioned below.
      
      
      <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</param-value>
         </context-param>
      
         <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>*.seam</url-pattern>
         </servlet-mapping>
      
        <session-config>
                  <session-timeout>30</session-timeout>
       </session-config>
      
      even here as well if i change  *.seam to *.jsf works fine for me.
      
      I am using all 2.2.0.GA Seam components with JBoss-AS-5.1.0.GA
      


      Please guide


      Thanks and Regards,
      Sachin Parnami


        • 1. Re: weired problem HTTP Status 404 home.seam no available
          Adrian Mitev Master

          Be sure you don't have to change something in compontents.xml

          • 2. Re: weired problem HTTP Status 404 home.seam no available
            Sachin Parnami Newbie

            Thanks for replying Adrian,


            component.xml


            contains this entry regarding abc-web




            <core:init debug="true" jndi-pattern="abc-web/#{ejbName}/local"/>
            



            Is there any thing else which should be present?



            I dont see any other entry in mine other working project :)



            • 3. Re: weired problem HTTP Status 404 home.seam no available
              Sachin Parnami Newbie

              Got it working had messed up with index.html


              would like to know that where do we define it should hit its first instance to index.html? , i mean the flow what exactly happens when i hit Context-root?


              • 4. Re: weired problem HTTP Status 404 home.seam no available
                B Tomic Newbie

                I guess it defaults to index.html, but you can override this with



                <welcome-file-list>
                      <welcome-file>index.html</welcome-file>
                </welcome-file-list>



                in web.xml.

                • 5. Re: weired problem HTTP Status 404 home.seam no available
                  Sachin Parnami Newbie

                  Thanks for replying, but i am afraid its not even there :(
                  this is how my web.xml looks like




                  <?xml version="1.0" ?>
                  <web-app 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" 
                           version="2.5">
                  
                      <!-- Ajax4jsf -->
                      
                      <context-param>
                          <param-name>org.richfaces.SKIN</param-name>
                          <param-value>#{appearanceBean.skin}</param-value>
                      </context-param>
                   
                  
                     <!-- 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>
                     
                     <!-- Facelets development mode (disable in production) -->
                     
                     <context-param>
                        <param-name>facelets.DEVELOPMENT</param-name>
                        <param-value>true</param-value>
                     </context-param>
                      
                     <!-- JSF -->
                     
                     <context-param>
                        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                        <param-value>.xhtml</param-value>
                     </context-param>
                  
                     <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>*.seam</url-pattern>
                     </servlet-mapping>
                  
                    <session-config>
                              <session-timeout>30</session-timeout>
                   </session-config>
                  
                                    
                     <security-constraint> 
                         <display-name>Restrict raw XHTML Documents</display-name>
                         <web-resource-collection>
                             <web-resource-name>XHTML</web-resource-name>
                             <url-pattern>*.xhtml</url-pattern>
                         </web-resource-collection>
                         <auth-constraint/>
                     </security-constraint>
                     
                     
                     
                  </web-app>