Hi Tim
Yes, as I described in one of my letters, I have used the
getRequestDispatcher, but when I do, images don't cache
in IE under https, no matter what I am forward'ing to or
include'ing to, whether it is in my web app context
or outside of it. I have a META-INF/context.xml with
allowLinking=
Filters are only run on the incoming request. They can run on include() and
forward() to but you need to see configure that in web.xml.
If you are renaming the servlet path - you can't call chain.doFilter() and
get the results you expect. YOu need to get a new RequestDistpatcher for the
locati
Hello Tomcat users
I am attempting to use a Filter to first modify
a portion of the incoming URL (request.getServletPath())
and next, to send this filtered request on to the
tomcat DefaultServlet. The filter is indeed called
and I am able to complete the first goal of modifying
the incoming URL.
I think this should work in your own web.xml:
MyFilter
default
-Tim
Maurice Yarrow wrote:
Tim
So, my question is: can I request that a filter be applied to all
static page requests that are going to DefaultServlet? Or is this
done with a Valve?
--
Tim
I *LIKE* this idea. Yes!
And it simply does an endrun around my machinations here.
But, actually, I have a question.
For this to work for me, it would have to be the case that
this filter is in front of the tomcat DefaultServlet. Which
means that and elements need
to go in front of the
Use a servlet filter to rewrite the request and let the DefaultServelt stay
untouched. Then you get easily maintainable code and its not tomcat specific.
For example:
doFilter(request, response, filterChain) {
if (magicalCanRewrite(request)) {
String newPath = magicMethodTOGetNewPathFromS