tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mailing Listen" <m.entwickl...@itara.de>
Subject AW: Filter and servlet mapping problem
Date Tue, 29 Jul 2003 08:27:32 GMT
But if i access servlet mapped via invoker Servlet or by the jsp servlet It works fine this
means here i can modify the request before it is executed. I thougth with an Filter i am before
a Webapp.


________________________________

Von: news im Auftrag von Bill Barker
Gesendet: Di 29.07.2003 09:28
An: tomcat-user@jakarta.apache.org
Betreff: Re: Filter and servlet mapping problem



By the time it has gotten to your Filter, Tomcat has already decided on
which Servlet will serve the request (and it is too late to change it's mind
:).  You need to do something like:
   String oldURI =
unWritePath(request.getServletPath()+request.getPathInfo());
   RequestDispatcher rd = getServletContext().getRequestDispacher(oldURI);
   rd.forward(request, response);
   return;

"Mailing Listen" <m.entwicklung@itara.de> wrote in message
news:09D77CB188889A408285E85E30BD3908084362@itaraprimdomain.itara.de...
I have written a filter for my webapp where i catch the response and Rewrite
all URLs with a timestamp for bypassing some proxies that ignore The
settings i set on my webserver (e.g. no-cache, no-store,...). The Filter
works fine, but i haveto modify the requests when the reache my webserver. I
am able to do this, but this only works if i the servlets i access are
mapped in the web.xml of tomcat in the conf directory. The servlets that are
mapped within the web.xmnl in the current context are not found.

For explaining my problem a little more here an example:

I have a URL like /myjsp.jsp

I rewrite ist with /myjsp_<timstamp_in_millis>.jsp (<timstamp_in_millis> is
the current timestamp) I filter this to /myjsp.jsp if the user requests the
rewritten URL For .jsps that are mapped in the conf/web.xml file (by the
default jsp servlet) anything works But i have some more servlet and some
special jsp mappings that are mapped within the context and here i recieve
an 404 although the servlet pathe and the URI are set correctly.

Any advice is welcome

Burkard Endres





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