tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Morton <fmor...@base2inc.com>
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" />
                 <Logger 
className="org.apache.catalina.logger.SystemOutLogger" timestamp="true" 
/>
         </Context>

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 
context.

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?

Thanks.


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


Mime
View raw message