Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameters to actionMapping

 
YanJun Tong
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,I got a problem during using struts framework.
Generally we use return actionMapping.findForward("success") to direct the web application to other pages.
However what if I want to pass some parameters to that mapping?For instance suppose the above code will direct me to abcdAction.do. But now I want it to be directed to "abcdAction.do?parm1=1234" the value of the variable parm1(1234) can not be predicted in advance.
Thanks in advance
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't it work to set the parameter to request?
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

yah u can do that by sending as a query string then it will come as a req paramtere for ur next action ....r else u can set that parameter in request and if u move across two actiosn with a single request ur request will be available to the next action also

hope u got what i am saying
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic