Hi Phil,

Maybe my response was specific to a situation I had before.  In some of the apps
I've worked on, I needed to use my own RequestProcessor to insert some logic
before a <forward> is processed.  If I have <action>s that don't need an Action
object, using forward="myJsp.jsp" won't trigger the processForwardConfig(), in
which case my overridden RequestProcessor method doesn't get called.  With
ForwardAction, I wouldn't have to create a do-nothing action just to forward to a
JSP and ensure that processForwardConfig() still gets called.  In other apps
where I didn't need the custom processForwardConfig(), I still use ForwardAction
so in case I do need it in the future, I won't have to go back and remap
everything.  Who knows, maybe the next Struts version will behave differently
when all it has is forward="myJsp.jsp", though that part's just me guessing.
Like I said, it depends on your app, so it may or may not affect you.  Also,
check ForwardAction's javadoc for another example of its use.

HTH,
Hubert

--- Phil <[EMAIL PROTECTED]> wrote:
> Hi Hubert,
> 
> thanks for your answer.
> I thought of this too. But then i examined the source code of the
> RequestProcessor. There, the forward element is processed just before the
> operations which are related to the actions (like creating Action instances
> and calling the execute() method) are processed. After this there are no
> more features called. So i think using the forward attribute has no impact
> to any features of struts. All operations they need to work right are done
> before the forward attribute is processed.
> But maybe i didnt examine the source code right. If you know a case in which
> a feature does not work with the forward attribute this would be very
> helpful to me.
> 
> Phil
> 
> 
> ----- Original Message -----
> From: "Hubert Rabago" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 05, 2003 5:39 PM
> Subject: Re: Forward attribute vs. ForwardAction
> 
> 
> > Phil,
> >
> > ForwardAction allows a response to still go through struts processing.
> > Not all of the Struts features will kick in or perform as expected
> > when you use forward="/login.jsp".
> > I don't have a full list of which ones will still work and which ones
> > won't, and it may depend on the complexity of your app, so it may or
> > may not affect you.  Think of ForwardAction as add'l future-proofing
> > for your app/action.
> >
> > Hubert
> >
> > --- Phil <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > i write my thesis about the struts framework and i have a question about
> the
> > > ForwardAction class. I think the forward attribute in an action-mapping
> has
> > > the same effect as the use of the ForwardAction, so why is there a
> special
> > > class to perform a forward?
> > >
> > > I think you get the same result if you use:
> > >
> > > <action
> > >     path="/login"
> > >     type="org.apache.struts.actions.ForwardAction"
> > >     parameter="/login.jsp" />
> > >
> > > or:
> > >
> > > <action
> > >     path="/login"
> > >     forward="/login.jsp" />
> > >
> > > So what is the benefit of the ForwardAction class?
> > >
> > > Thanks,
> > > Phil
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Protect your identity with Yahoo! Mail AddressGuard
> > http://antispam.yahoo.com/whatsnewfree
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to