forwarding from one Action to another Action with new parameters
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lordmaciek_lordmaciek
Posted On:   Thursday, April 4, 2002 12:32 AM

I' like to forward from an Action (for example AddRoleAction) to another Action (for example ShowUserAction);
But the ShowUserAction needs a parameter: ?id=user_id;
How to add in AddRoleAction the paramater to the request forwarded to ShowUserAction?

I have done it like this but I don't like it and it's not working well:

X:ActionForward

X.setPath(X.getPath()+"?id="+user_id);

Re: forwarding from one Action to another Action with new parameters

Posted By:   Haining_Mu  
Posted On:   Thursday, April 4, 2002 06:03 AM

there is no direct servlet api support add/change parameter. However, there exist third party servlet implementations and apache custom taglib to support this function. Or, you may just use request.setAttribute() and retrive it with getAttribute if applicable. I have seeing the way to append to existing path as you did in some books.
About | Sitemap | Contact