aspose file tools*
The moose likes Struts and the fly likes How to pass parameters to struts action-path-forward ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to pass parameters to struts action-path-forward ?" Watch "How to pass parameters to struts action-path-forward ?" New topic
Author

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

suji pra
Greenhorn

Joined: Sep 27, 2002
Posts: 11
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.


He is able who thinks he is able.
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
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.


"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The JavaPerformanceTuning.com team, Newsletter 039.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass parameters to struts action-path-forward ?