File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts Forward Redirect with Parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Forward Redirect with Parameter" Watch "Struts Forward Redirect with Parameter" New topic
Author

Struts Forward Redirect with Parameter

Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3712
    
    5

I have a struts action that defines a forward action such as the follow:

My action code forwards to "yay" based on some control logic such as:


Question is this: Can I pass a url/form parameter to "/happyWidget.do" on the redirect? If so, how? It seems to lose any information I set in the form if redirect is set.
[ May 29, 2008: Message edited by: Scott Selikoff ]

My Blog: Down Home Country Coding with Scott Selikoff
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3712
    
    5

Actually I managed to solve it one way by modifying the ActionForward object. Granted you can't modify it directly (without throwing a frozen configuration exception), so the following works although it doesn't seem right to me.

[ May 29, 2008: Message edited by: Scott Selikoff ]
 
 
subject: Struts Forward Redirect with Parameter