1 Reply Latest reply on Jan 17, 2011 5:54 AM by Paweł Baran

    index.xhtml as welcome-file

    Paweł Baran Newbie

      Hello!
      I've some problems with web.xml configuration. I'd like to load index.seam after entering localhost:8080/web_app. But i always get source of index.xhtml. I'm running on Tomcat 6. Below i placed my current web.xml:


      <display-name>... Application</display-name>
              <description>
                      This is version X.X of an application.
              </description>
      
              <context-param>
                      <param-name>webmaster</param-name>
                      <param-value>@gmail.com</param-value>
                      <description>
                              The EMAIL address of the administrator to whom questions
                              and comments about this application should be addressed.
                      </description>
              </context-param>
      
              <listener>
                      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
              </listener>
      
              <filter>
                      <filter-name>UrlRewriteFilter</filter-name>
                      <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
              </filter>
      
              <filter-mapping>
                      <filter-name>UrlRewriteFilter</filter-name>
                      <url-pattern>/*</url-pattern>
              </filter-mapping>
      
              <filter>
                      <filter-name>Seam Filter</filter-name>
                      <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
              </filter>
      
              <filter>
                      <filter-name>SimplePageCachingFilter</filter-name>
                      <filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter</filter-class>
                      <init-param>
                              <param-name>cacheName</param-name>
                              <param-value>SimplePageCachingFilter</param-value>
                      </init-param>
                      <init-param>
                              <param-name>suppressStackTraces</param-name>
                              <param-value>false</param-value>
                      </init-param>
              </filter>
      
              <filter-mapping>
                      <filter-name>SimplePageCachingFilter</filter-name>
                      <url-pattern>/index.seam</url-pattern>
              </filter-mapping>
      
              <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>
      
              <context-param>
                      <param-name>facelets.DEVELOPMENT</param-name>
                      <param-value>true</param-value>
              </context-param>
      
              <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>10</session-timeout>
              </session-config>
      
              <error-page>
                      <error-code>404</error-code>
                      <location>/file\_not\_found.seam</location>
              </error-page>
      
              <welcome-file-list>
                      <welcome-file>index.xhtml</welcome-file>
              </welcome-file-list>
      





      (UrlRewriter hasn't got any rules and main page (localhost:8080/web_app) should be only cached.)


      Thanks!