Interesting issue. Anyway, can't think of anything that solves it in a clean
way.

If you give me (if you can) further information about what your filter does,
I could give it  a try at thinking about an alternative solution.

Cheers,

F.



-----Mensaje original-----
De: Brij Naald [mailto:[EMAIL PROTECTED]
Enviado el: sábado, 04 de diciembre de 2004 18:56
Para: [EMAIL PROTECTED]
Asunto: RE: Filter/...


Hi,
you indeed didn't the question :-) (but still, thanks for answering!)

The problem is as follows:

I'm making a plugin which puts a wrapper around the request of a servlet.

A servlet gets invoked by:
doGet(HttpServletRequest request, HttpServletResponse response)

What I want to do now is to put a filter in front of it. When a request
comes in,
the filter does:
newrequest= new RequestWrapper(request);
chain.doFilter(newrequest, response);

That way the servlet is invoked with a wrapper around the request.
Until now, this approach works.

Now comes the problem:
the filter also does some other things than creating the wrapper. That way
it always has to be called, before a servlet is called.

The filter I have now, always get called when there is an incoming request.
But when a servlet uses a requestdispatcher to include another servlet, the
filter doesn't get called.

In a little schema:

Without filter the call looks like:

Request --> Servlet1 --> Servlet2    (so servlet1 uses a requestdispatcher
to include servlet2)

If you add a filter to this you get:

Request --> Filter -> Servlet1 -> Servlet2

But what I need to get is:
Request --> Filter -> Servlet1 -> Filter -> Servlet2

_________________________________________________________________
Heb je MSN WebMessenger al ontdekt? http://webmessenger.msn.com/?mkt=nl-be


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to