struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gandle, Panchasheel" <pgan...@rwjf.org>
Subject RE: any replacement for include file dynamic
Date Tue, 23 Sep 2003 20:49:45 GMT
I don't want to loose the pageContext which happens with the dynamic
includes.


Thanks
Panchasheel


-----Original Message-----
From: Christian Bollmeyer [mailto:java@christianbollmeyer.de]
Sent: Tuesday, September 23, 2003 4:17 PM
To: Struts Users Mailing List
Subject: Re: any replacement for include file dynamic


Am Dienstag, 23. September 2003 21:48 schrieb Gandle, Panchasheel:
> has anyone come across a replacement to
> <%@include file="/abc/xyz.jsp"  %>
>
> where the file attr can be dynamic ?

For dynamic includes, try the standard action first:

<jsp:include page="page" /> 

For extended functionality, such as not being limited
to including content from 'same context | server'
resources,  there's a JSTL action that allows for
dynamically including content on a URL basis:

<c:import url="url" /> 

Note that you may also pass parameters in both cases.

Finally, for if you're looking for a really advanced
approach in this direction, check out the Tiles plugin
(which can be run indepently of Struts as well, just to
note).

-- Chris

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


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

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


Mime
View raw message