Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding parameters to ActionForward

 
AnilPrakash Raju
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Any suggestions?

thanks

Anil
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Sheldon Fernandes
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you do this inside a page? to make a series of links that are similiar each with a different parameter or querystring?

-Tad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic