struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <cedric.dumou...@lifl.fr>
Subject Re: Relative URI usage in <struts-template:template tags...
Date Fri, 01 Feb 2002 16:08:23 GMT

  Hi Alex,

    Personally I use absolute paths to avoid such conflict :
   <template:put name="content"
content="<%=request.getContextPath()%>/cart/cartContent.jsp" />

  Behavior that you quote is more natural, but require complex computation to
implement. Maybe one day.

    Cedric


Alex Paransky wrote:

> I have the following structure for my web site:
>
> <common>
>   template.jsp
>
> <cart>
>   cart.jsp
>   cartContent.jsp
>
> When I use the template:insert tag from cart.jsp, the content is being
> included relative to the location of template.jsp which is in common, and
> not cart.jsp which is in cart.  I have to specify "../cart/cartContent" in
> my put for it to work correctly.
>
> Here is how cart.jsp looks like today:
>
> <template:insert template="../common/template.jsp">
>   <template:put name="content" content="../cart/cartContent.jsp" />
> </template:insert>
>
> Would it not be more natural, if all the included content was relative to
> location of "cart.jsp" and not to the template?  So that one could write
> cart.jsp in the following way:
>
> <template:insert template="../common/template.jsp">
>   <template:put name="content" content="cartContent.jsp" />
> </template:insert>
>
> Is there a way of making this work in the above described fashion?
>
> -AP_
> www: http://www.alexparansky.com
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


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


Mime
View raw message