struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: AW: ActionForward Proposal (was Re: Change to Action.perform() signature?)
Date Fri, 30 Jun 2000 01:15:06 GMT
David Chisholm wrote:

> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> > Sent: Thursday, June 29, 2000 7:52 PM
> > To: struts-dev@jakarta.apache.org
> > Subject: Re: AW: ActionForward Proposal (was Re: Change to
> > Action.perform() signature?)
> >
> >
> > "Nestel, Frank" wrote:
> >
> > > Those forwards sound very good. On top of that
> > > one could easily have an tag <struts:forward name="logon">
> > > allowing to work with virtual URI's in JSP as well.
> > >
> >
> > I just added this tag, and a corresponding <struts:include> tag that looks
> > up the logical name and includes the page at the corresponding
> > actual path,
> > at this point in the page.
> >
> > >
> > > Global forwards are nice either. Would it make sense that
> > > the ActionMapping.findForward(...) tries an Servlet.findForward(...)
> > > in case it does not find the mapping in it's own tables?
> >
> > Doing this sounds like it would be useful.  An interesting implication is
> > that the ActionMapping class would have to know how to find either the
> > ActionServlet that owns it, or the global ActionForwards collection.  The
> > latter would probably be safer.
> >
>
> I think it's useful as a safety net and for situations were you want to
> override a default global ActionForward with one locale to the
> ActionMapping.
>

It also means you can program your Action without caring whether your forwarding
entry was registered as local or global.  This will reduce errors.

A change to do this will be checked in momentarily.

>
> Btw, would it be useful to the forward tag to forward to actions too?  For
> example <struts:forward action="myActionName"/>.
>

As currently written, <struts:forward> goes to the new page immediately, just
like <jsp:forward> does.  Given that, I'm not sure it really makes sense to
forward to an action.  But maybe we want to extend the <struts:link> tag so that
you can generate hyperlinks to pages based on the logical name?

(It doesn't really help much on actions because the "logical" name of an action
is in fact the path itself).

>
> David

Craig





Mime
View raw message