• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between ForwardAction and ActionForward

 
Sultan Khadar
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any body please explain the difference between org.apache.struts.actions.ForwardAction and org.apache.struts.action.ActionForward classes?

Thanks in Advance,
Sultan.
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the API for these two classes? Their names might share the same words but they are quite different. ForwardAction is a type of action where ActionForward is the object that you return from your execute method.

From the 1.1 documentation (at http://struts.apache.org/1.1/api/index.html):

ActionForward: An ActionForward represents a destination to which the controller servlet, ActionServlet, might be directed...as a result of processing activities of an Action class.

ForwardAction: An Action that forwards to the context-relative URI specified by the parameter property of our associated ActionMapping.

- Brent
 
Sultan Khadar
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brent for the clarification.

Regards,
Sultan.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic