File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes saveToken in forward action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saveToken in forward action" Watch "saveToken in forward action" New topic

saveToken in forward action

James Quinton
Ranch Hand

Joined: Oct 02, 2006
Posts: 94
ForwardAction provides a simple approach if you just want a link being forwarded to a jsp page without actually writing an Action class. But how can you saveToken on that jsp since you don't have coding anymore?
Does struts action-mapping tag provides this feature? I don't see it.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm afraid ForwardAction doesn't do anything with tokens. You'll have to write an Action class if you want to use the saveToken method.

Consultant, Sima Solutions
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
You could easily write one action class that called saveToken and then returned "findForward("success")" (or whatever you wanted to do). You could then have multiple action mappings that used this same implementation.

- Brent
I agree. Here's the link:
subject: saveToken in forward action
It's not a secret anymore!