tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Tomcat <tom...@mobile.mp>
Subject Re: How can I map all requests to a single servlet?
Date Wed, 12 Jun 2002 23:40:30 GMT
On Wednesday 12 June 2002 13:51, you wrote:
> Ummm.... I *think* you can do this to the app's web.xml:
>
> <servlet-mapping>
>         <servlet-name>MainServlet</servlet-name>
>         <url-pattern></url-pattern>
> </servlet-mapping>

You can use <url-pattern>/*</url-pattern>.  Be careful with this, though, 
because if that servlet does 
servletContext.getRequestDIspatcher("/foo/bar.jsp");, it will end up in a 
loop, which is rarely useful.  You are probably better off using a filter for 
/* than you are using a servlet in most cases.

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message