tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amos Shapira <amos.shap...@webcollage.com>
Subject RE: [HELP] I want to redirect all calls on a specific servlet
Date Wed, 12 Jul 2000 09:21:59 GMT
Hi,

Use path mapping in the web.xml file, like:

<servlet>
  <servlet-name>handle-all-jsp-file</servlet-name>
  <jsp-file>index.jsp</jsp-file>
</servlet>
<servlet-mapping>
  <servlet-name>handle-all-jsp-file</servlet-name>
  <url-pattern>/dir1/dir2/dir3/*</url-pattern>
</servlet-mapping>

This is off the top of my head (with the Servlet 2.2 spec in front of me).
The path in the url-pattern tag should be relative to the root of the web
application (the parent of the WEB-INF directory which holds the above
web.xml
file).

Look in the Servlet 2.2 spec (from java.sun.com) for more details.

Cheers,

--Amos Shapira
WebCollage

> -----Original Message-----
> From: ARNOD-PRIN Samuel [mailto:sarnodprin@marvel.ch]
> Sent: Wednesday, July 12, 2000 11:59 AM
> To: tomcat-user@jakarta.apache.org
> Subject: [HELP] I want to redirect all calls on a specific servlet
> 
> 
> Is it possible with tomcat when the page
> 
> /dir1/dir2/dir3/file1.jsp (or even file1.html)
> 
> is called to call only one jsp ?
> 
> -> index.jsp
> 
> 
> it means all calls are redirected on index.jsp and index.jsp can know
> which url is called...
> 

Mime
View raw message