You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arne Brutschy <ab...@xylon.de> on 2007/09/19 15:08:53 UTC
Request Processing Chains - HOWTO... ?
Hello,
I'm new to struts 1.3.x and therefore not used to the new request
processing using common-chains. I have two questions:
How do I filter/add request parameters? "In the old days" (TM) I
simply added a filter, which wrapped a RequestWrapper around the
non-writable map. How can I do that now? The structure of the context
isn't quite clear to me, and I don't know where to set the new request
wrapper object...
Second question is connected (= me not knowing where to set things):
Suppose I have authentication checker, which is called through the
servlet-standard-preprocess chain as shown here:
http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains2.html
So when the filter detects, that the user isn't logged in yet, I want
it to redirect/forward to some /login.jsp. How do I do that know?
I think I haven't got the internal structure of the request processing
yet. And informations on the process/how to use and expand it are hard
to get.. Any hints?
Arne
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Request Processing Chains - HOWTO... ?
Posted by Paul Benedict <pb...@apache.org>.
Arne,
How do I filter/add request parameters? "In the old days" (TM) I
> simply added a filter, which wrapped a RequestWrapper around the
> non-writable map. How can I do that now? The structure of the context
> isn't quite clear to me, and I don't know where to set the new request
> wrapper object...
Nothing has changed in this respect. You should still be able to use a
filter.
Second question is connected (= me not knowing where to set things):
> Suppose I have authentication checker, which is called through the
> servlet-standard-preprocess chain as shown here:
> http://www.onjava.com/pub/a/onjava/2005/03/02/commonchains2.html
> So when the filter detects, that the user isn't logged in yet, I want
> it to redirect/forward to some /login.jsp. How do I do that know?
I wouldn't build this into the Struts request processor. This definitely
sounds like another filter.
Paul