Can we call an Action from another Action in struts???
Let me explain my situation.
I have a form for updating the customer details.when ever the user
say submit,it calls the action and performs the updation.Now comes my
problem,I want to redirect back to the same update page with the newly
updated values.I think you got what i meant.
Let me be specific,Can i call an action from another action?.
this should call another form bean and Action.
If it is possible please do let me know.
waiting for your suggestions.
Re: Can we call an Action from another Action in struts???
> Let me be specific,Can i call an action from another action?.
> somthing like
> new ActionForward("something");
> this should call another form bean and Action.
You can define a forward in the Struts config file that refers to an
<forward name="something" path="/Something.do"/>
<action path="/Something" ... />
Then your action can do this:
You need to establish a strategy for organising actions around pages,
otherwise you will get yourself in a knot. For example, do you have an
action that populates the request with the required data for the view
(i.e. the JSP), forward to that view, then have another action that
processes the submit? Or do you combine the two actions into one, using
parameter derived from the form button to choose your course through a
Have a look at this, particularly the sections starting at "Two actions,
Also, try some searches on "action chaining", e.g.
|All times are GMT. The time now is 08:39 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.