Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Adding parameters to ActionForward

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic