A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to forward to Action class
Joined: Jul 24, 2006
Sep 21, 2006 08:54:00
I have a jsp which makes request to an Action class Action1.
Action1 get all request parameters, say form parameters , updates the database and then it should forward the control to another Action Action2 or an jsp.
The forward to jsp is working fine.
but for the forward to Action2 gives an error, resource with path /action2 is not available.
my mapping is
my struts-config.xml is
< action path="/action1" type="Action1" name="myForm">
< forward name="myjsp1" path="/myjsp1" /> --> no problem here..
< forward name="action2" path="/action2" /> --> here i have problem..
< action path="/action2" type="Action2" name="myForm" >
< forward name="something" path="something" />
Joined: Feb 15, 2005
Sep 21, 2006 09:19:00
Change the following line
< forward name="action2" path="/action2" />
< forward name="action2" path="/action2.
Remember, this is a URL so it has to have the ".do" suffix.
explains more about action chaining.
I agree. Here's the link:
subject: How to forward to Action class
Struts forward question
Struts forward problem
Changing the url in browser
How to do Action mapping for this scenario ??
Forward to new action during the execution of another action
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014