struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Boudrant <b...@yahoo.fr>
Subject Re: action-mapping
Date Wed, 04 Dec 2002 22:25:26 GMT

 You a 3 type of action-mapping :
A simple forward 
<action path="/toto" forward="/toto.jsp"/> 
A simple include 
<action path="/toto" include="/toto.jsp"/> 
Or a typed action :
<action path="/toto" type="com.toto.TotoAction">
 <forward name="success" path="/ok.jsp"/>
 <forward name="failure" path="/error.jsp"/>
</action>
With the forward/include action, you don't need to create an action class, they are using
only to forward/include one path.
With an typed action, you can define multiple forwards depending of the state of your operation,
use mapping.findForward( NAME );
Is it clear ?
-emmanuel
 
  "LUCERO,DENNIS (HP-Boise,ex1)" &lt;dennis_lucero@hp.com&gt; a écrit : I am a newbie
but I am a little confused about the following.
In the struts api it states the following about the forward property of the
action mapping class

Exactly one of the forward, include, or type properties must be specified.

But, in the examples I downloaded with the struts package they have multiple
forward entries along with a type entry.
Also, the forward entry is used by whatever action class services this
request.

return (mapping.findForward("success"));

Somebody shed some light on this for me please.

thanks

We come from the land of the ice and snow
With the midnight sun, where the hot springs glow
The hammer of the gods, will drive our ships to new lands
Fight the horde, Sing and cry
Valhalla I am coming




---------------------------------
Soyez solidaire soutenez l’action du Téléthon avec Yahoo! France.
Cliquez ici pour faire un don !
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message