You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mohan rao <mo...@gmail.com> on 2011/09/16 17:50:44 UTC

How do i redirect to another action in filter?

Hi,

    As per my requirement i'm overriding prepareandexecture filter. I'm
restricting the user from un accessable actions he might be book marked it
before. I don't want to this in interceptor. I want to decide it on filter
itself because i can reduce some processing. I tried with RequestDispatcher
to forward the request It's not working because request dispatcher can't
deal with action class can process only servlets. And even i tried with
ActionMapping setting all the values manually the action what i want to
execute but it's not working. 

ActionMapping actionMaping = new ActionMapping();
        actionMaping.setNamespace("usermanagement");
        actionMaping.setName("prepWelcome");
        actionMaping.setMethod("prepWelcome");
        actionMaping.getResult(); //take default
        execute.executeAction(httpReq, httpRes, actionMaping);

 Throw me some light regarding this. Thanks. 

--
View this message in context: http://struts.1045723.n5.nabble.com/How-do-i-redirect-to-another-action-in-filter-tp4811120p4811120.html
Sent from the Struts - User mailing list archive at Nabble.com.

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