tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joakim Verona <>
Subject Re: dynamic includes.
Date Thu, 14 Sep 2000 13:14:02 GMT

is this what you mean?

<jsp:include  page="<%=menupage%>" flush="true" />

where menupage is a variable pointing to an arbitrary page.
the only problemi found whas that this construct didnt work:

<jsp:include  page="<%=menupage+"_test_suffix.jsp"%>" flush="true" />

which i think it should if you read the relevant part of the syntax ref.
but no big deal, it is easy to build the string in advance.

hope this helps.


"Daniel A. Theobald" wrote:
> 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.
> The objective is to include one of several files based on a parameter in
> my profile object.
> Any help would be greatly appreciated....
> theo

Joakim Verona

View raw message