Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pass dynamic parameter to Struts' forward

843836Mar 3 2005 — edited Jul 30 2005
In my application, when a user modifies a particular record from the database, after they edit it and save it, I want to show them the modified record.

I'm using struts, however, I don't know how to pass the recordID to the struts forward after it has been saved.

Here is my struts-config.xml
<action path="/saveEquipmentTemplate" 
         type="cafe.struts.actions.SaveEquipmentTemplateAction" 
         name="equipmentTemplateForm"
         input="saveequipmenttemplate.input" 
         scope="request">

         <forward name="saveequipmenttemplate.success" 
         redirect="true" 
         path="/showEquipmentTemplate.do" />
</action>
What I would like is something like this:
<forward name="saveequipmenttemplate.success" 
         redirect="true" 
         path="/showEquipmentTemplate.do?recordID=XXX" />
Where XXX is the recordID that was just modified.

To recap, how do I pass a dynamic parameter to an action forward in struts?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2005
Added on Mar 3 2005
5 comments
341 views