Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saveToken in forward action

 
James Quinton
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic