tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Heil" <li...@steffen-heil.de>
Subject AW: Would like to extract every request to servelt except index.html
Date Sat, 03 Apr 2010 11:43:40 GMT
Hi

Assuming you need to redirect everything except "/index.html", then the
following will probably work:

    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/index.html</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SearchServerServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

Note that this will NOT catch index.html files in different folders.

Regards,
  Steffen


-----Urspr√ľngliche Nachricht-----
Von: Paul Taylor [mailto:paul_t100@fastmail.fm] 
Gesendet: Freitag, 2. April 2010 10:52
An: Tomcat Users List
Betreff: Would like to extract every request to servelt except index.html

I would like every request to be redirected to a central servlet EXCEPT  
if the  request is simply index.html, but at the moment everything gets 
redirected to the servlet, how could I do what I want

This is extract from my web.xml
 
<servlet-mapping>
  <servlet-name>SearchServerServlet</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

thanks Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Mime
View raw message