tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: dynamic includes.
Date Thu, 14 Sep 2000 08:17:40 GMT
Hi,

> -----Original Message-----
> From:	Daniel A. Theobald [SMTP:theo@vecnatech.com]
> Sent:	Thursday, September 14, 2000 6:46 AM
> To:	tomcat-user@jakarta.apache.org
> Subject:	dynamic includes.
> 
> I am trying to figure out how to do an include where the file to be
> included is specified in a user profile object.
> I have tried many things, read the relevant jsp spec pages, scanned
> through lots of the mailing list archive..... nothing.
> 
> It seems to me like this is something that people would want to do, so
> I am either missing something simple (likely) or there must be another
> way to accomplish the objective.
> 
> of course the first thing I tried was
> 
> <%@ include file = profile.getContentFile() %>
> 
> but the jsp engine wasn't too happy about it.
	[Kitching Simon]  
	I think what you are looking for is:

	<%
	pageContext.include(profile.getContentFile());
	%>

	The documentation for this function can be found in the servlet2.1
or servlet2.2
	documentation download from the sun site developer.java.sun.com

	Hope this helps,

	Simon.

> The objective is to include one of several files based on a parameter in
> my profile object.
> 
> Any help would be greatly appreciated....
> theo
> 

Mime
View raw message