You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Gandle, Panchasheel" <pg...@rwjf.org> on 2003/09/23 21:48:09 UTC

any replacement for include file dynamic

has anyone come across a replacement to
<%@include file="/abc/xyz.jsp"  %>

where the file attr can be dynamic ?


Thanks
Panchasheel

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


Re: any replacement for include file dynamic

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
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


Re: any replacement for include file dynamic

Posted by Sgarlata Matt <sg...@bah.com>.
You would have to use <jsp:include> because <%@ include %> does the include
at compile-time.  <jsp:include> does includes at runtime.

Matt
----- Original Message ----- 
From: "Gandle, Panchasheel" <pg...@rwjf.org>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 3:48 PM
Subject: any replacement for include file dynamic


> has anyone come across a replacement to
> <%@include file="/abc/xyz.jsp"  %>
>
> where the file attr can be dynamic ?
>
>
> 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