struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal Deadman" <hal.dead...@Tallan.com>
Subject RE: Subapps and /WEB-INF (was: Re: DO NOT REPLY [Bug 10268] - Sub-apps need context-relative option for 'input' of an Action)
Date Mon, 01 Jul 2002 19:30:00 GMT
Those changes sound fine but is "forward" a good name for the new action
attribute? I think inputforward provides a slightly better description of
what the attribute is used for. I have always thought that it was not clear
that the attributes "name", "input", "validate", and "scope", all refer to
the action form (or at least they only apply if there is a form) but they
are attributes of the action. I think adding forward would be similarly
confusing.

> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Monday, July 01, 2002 3:11 PM
> To: Struts Developers List
> Subject: Subapps and /WEB-INF (was: Re: DO NOT REPLY [Bug 10268] -
> Sub-apps need context-relative option for 'input' of an Action)
>
>
> Martin raises some interesting issues in this enhancement
> request that I'd
> like to discuss a little before we figure out what to do.
>
> The simplest issue is a design faux pas in the original struts-config
> setup -- the "input" parameter really should have been the name of a
> corresponding forward, so that we could auto-calculate the
> actual URL more
> gracefully.  We can't change the past, but it wouldn't be
> hard to add an
> additional "forward" attribute as an alternative to "input",
> that works
> this way.  What do you think?
>
> The more important issue Martin raises is that the algorithm for
> sub-application mapping (context-relative prefix) doesn't
> play very nice
> with folks who want to put their JSP pages in the /WEB-INF
> subdirectory.
> One way to get around this would be to modify the algorithm
> for converting
> a subapp-relative path into an absolute path in
> RequestUtils.computeURL().
> Instead of always sticking the subapp prefix before the
> specified path,
> it would look at the subapp-relative path and, if it started with
> "/WEB-INF" and perform the appropriate surgery.  Thus, a
> forward to the
> subapp relative page "/WEB-INF/foo.jsp" in subapp "/mysubapp"
> would end up
> creating the URL:
>
>   /WEB-INF/mysubapp/foo.jsp
>
> instead of the current:
>
>   /mysubapp/WEB-INF/foo.jsp
>
> While this is sort of a kludge (and the whole algorithm is
> something that
> should be more easily pluggable in a post-1.1 design), it
> *is* backwards
> compatible with current usage without subapps (i.e. the path
> of a page for
> the default subapp is the same as it is now).
>
> What do you think about implementing both of these options
> (new "forward"
> option on <action>, and the calculation change)?  Together, I
> think they
> address what Martin is after, and deals with the more general
> problems of
> using subapps together with /WEB-INF.
>
> Craig
>
>
> On 1 Jul 2002 bugzilla@apache.org wrote:
>
> > Date: 1 Jul 2002 18:10:02 -0000
> > From: bugzilla@apache.org
> > Reply-To: Struts Developers List <struts-dev@jakarta.apache.org>
> > To: struts-dev@jakarta.apache.org
> > Subject: DO NOT REPLY [Bug 10268]  -     Sub-apps need
> context-relative
> >     option for 'input' of an Action
> >
> > DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> > RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> > <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10268>.
> > ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> > INSERTED IN THE BUG DATABASE.
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10268
> >
> > Sub-apps need context-relative option for 'input' of an Action
> >
> >
> >
> >
> >
> > ------- Additional Comments From martinc@apache.org
> 2002-07-01 18:10 -------
> > The problem is, my JSP pages are under WEB-INF, and the
> computed URL messes up
> > the path to that directory. If my action config looks like this:
> >
> >   <action ... input='/WEB-INF/pages/myPage.jsp' ... />
> >
> > then the computed URL looks like this:
> >
> >   /myApp/mySubApp/WEB-INF/pages/myPage.jsp
> >
> > which is incorrect - the sub-app name should not be there.
> It needs to be:
> >
> >   /myApp/WEB-INF/pages/myPage.jsp
> >
> > to work correctly.
> >
> > There was also a thread on struts-user a while ago where
> someone else was
> > having a similar problem:
> >
> > http://marc.theaimsgroup.com/?l=struts-user&m=101865931500963&w=2
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message