Hey Chris,

You could try a Struts 2 Interceptor, which would on the intercept method 
either ( based on the servlet path )return a global result e.g. <result 
name="login"...  or just execute the next interceptor in the chain e.g.  
invocation.invoke(). Probably best to have the custom interceptor you create at 
the top of the interceptor list.

Hope this helps.
Gus.


-----Original Message-----
From: Chris Boldon [mailto:cbol...@gmail.com]
Sent: Tuesday, 20 January 2009 11:31 a.m.
To: user@struts.apache.org
Subject: Filter chaining, redirecting to an action?


I am working on converting a few of my applications from Struts 1 to Struts
2.

My application in Struts 1 had a filter which checked the servlet path,
compared it to a list of known actions and handled accordingly.

If the mapping existed, it would forward it on it's merry way, to the
correct action (one.action).  Anything else is redirected to another action
(two.action).  My issue is with the second part, redirecting to another
action using the filter.

In Struts 1, I was able to set the new path on the RequestDispatcher, and
forward it on using forward(req,res).  Since Struts 2 now uses a filter, I
was hoping I could modify the request accordingly and forward it on in the
filter chain (chain.doFilter(req,res)).  This, I do not know how to do.

Any tips would be greatly appreciated.

~Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to