tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Morton <>
Subject 404 capture anywhere without apache
Date Fri, 03 Dec 2004 15:43:14 GMT
Another view of a previous post...

I have a context currently defined in server.xml as:

         <Context path="/mycity" docBase="mycity" debug="9" 
reloadable="true" crossContext="true" >
                 <Loader checkInterval="5" />
className="org.apache.catalina.logger.SystemOutLogger" timestamp="true" 

I would like to catch any 404 errors (with <error-page> or otherwise), 
even outside the context, and redirect to one specific url within the 
mycity context (and still be able to see the original url to redirect 
appropriately). All without running apache to do the redirecting.

So, if someone browses to http://MYHOST, since there is no root 
context, it could get redirected to a servlet within the mycity 

If someone browses to http://MYHOST/something, it would also be 
rerouted and I'd be able to grab the original url with getRequestURL().

Anyone know how to do this?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message