struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Raeburn" <st...@ninsky.com>
Subject RE: Newbie: Forwarding question
Date Fri, 04 Jul 2003 06:55:54 GMT
An ActionFoward represents information about a web destination (such as its
URL).

Actions return ActionForwards from their execute() method telling the
ActionServlet where to forward control.

A ForwardAction is a specialised Action that creates and returns an a
ActionForward based on a parameter (path) you configure.

One way of forwarding to another JSP uses the ForwardAction:

  <action-mappings>
    <action path="/myAction"
            type="org.apache.struts.actions.ForwardAction"
		parameter="/jsp/welcome.jsp">
    </action>
  </action-mappings>

The ForwardAction does not require you to configure an ActionForward, it
dynamically creates one from the parameter you supply.
You can only use the ForwardAction to forward to a URI within your web
application.

Steve


> -----Original Message-----
> From: Bob McCune [mailto:bmccune@frontiernet.net]
> Sent: July 3, 2003 11:03 PM
> To: Struts Users Mailing List
> Subject: Newbie: Forwarding question
>
>
> I've just started working with Struts and am having some difficulty
> understanding the practical difference between an ActionForward and a
> ForwardAction.  If I am simply creating links between JSP's is there any
> difference between using a global ActionForward versus using an action
> instance of type ForwardAction?
>
> TIA
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message