Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass parameters to struts action-path-forward ?

 
suji pra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to pass some parameters (just like a query string) to my <action path="/CustomerEnquiry" forward="/customer/CustomerEnquiry.jsp"/> I need some way to get the query string as CustomerID=1&FormId=1 Both teh properties(CustomerID, FormId) are available through form bean. How do i do it. Thankful for any help.
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure exactly what you're asking, but I think you want to use form bean values in the result forward of an action. If so, the form bean is still available in the request with the same name as the form has. i.e. if in your struts-config.xml the form bean is given a name="myForm" property, you can use request.getAttribute("myForm") to get the form bean in either the action or the result forward.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic