1 Reply Latest reply on Mar 3, 2005 2:37 PM by Ralph Churchill

    Redirect Filter

    Ralph Churchill Newbie

      I'm using JBoss 3.2.6 and Tapestry. I'm using a filter ( org.apache.tapestry.RedirectFilter) to redirect requests from http://localhost:8080 to http://localhost:8080/app -- which is the Tapestry servlet. If I specify a welcome-file, that page seems to be served instead, whereas in JBoss 3.2.3, I would always be redirected to /app.

      Here's the relevant part of my web.xml:

      <filter>
       <filter-name>redirect</filter-name>
       <filter-class>org.apache.tapestry.RedirectFilter</filter-class>
       <init-param>
       <param-name>redirect-path</param-name>
       <param-value>/app</param-value>
       </init-param>
       </filter>
       <filter-mapping>
       <filter-name>redirect</filter-name>
       <url-pattern>/</url-pattern>
       </filter-mapping>
       <servlet>
       <servlet-name>myapp</servlet-name>
       <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>myapp</servlet-name>
       <url-pattern>/app</url-pattern>
       </servlet-mapping>
       <welcome-file-list>
       <welcome-file>index.jsp</welcome-file>
       </welcome-file-list>
      Shouldn't this work?

      RMC

        • 1. Re: Redirect Filter
          Ralph Churchill Newbie

          I was able to solve this by setting the welcome-file to be my servlet, e.g:

          <servlet>
           <servlet-name>myapp</servlet-name>
           <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
           <load-on-startup>1</load-on-startup>
           </servlet>
           <servlet-mapping>
           <servlet-name>myapp</servlet-name>
           <url-pattern>/app</url-pattern>
           </servlet-mapping>
           <welcome-file-list>
           <welcome-file>myapp</welcome-file>
           </welcome-file-list>