This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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