A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Adding parameters to ActionForward
Joined: Jul 26, 2004
Nov 29, 2004 18:50:00
How can you add parameters to the path of actionForward?
eg. i want the jsp to go to taskAction.do?taskid=1 (where the taskId can change)
in the path, i got: taskAction.do
i need to add "?taskid=1" to the path.
I tried actionforward.setPath("path")
but a get an error "Configuration is Frozen" Message
Joined: Aug 18, 2004
Dec 01, 2004 20:26:00
You could try creating a new ActionForward using the existing ActionForward whose configuration is frozen, a clone so to say.
ActionForward modifiableActionForward = new ActionForward(existingActionForward);
Now you can modify the modifiableActionForward's path and return it from the method.
I have not tried this, but it should work. Not sure whether it is the right thing to do or if there is a better solution.
Please let us know, if this works or if you find something else that does.
Joined: Nov 16, 2004
Dec 02, 2004 13:34:00
How would you do this inside a page? to make a series of links that are similiar each with a different parameter or querystring?
I agree. Here's the link:
subject: Adding parameters to ActionForward
instantiate ActionForward objects
passing dynamic parameter in redirect
Different pages pointing to the Same Struts Action
POST parameter coming in null
Regarding apply JOIN by using JPQL.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014