Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 26756 invoked from network); 14 Sep 2000 17:55:50 -0000 Received: from unknown (HELO vdcrexc1.orange.ch) (212.215.1.70) by locus.apache.org with SMTP; 14 Sep 2000 17:55:50 -0000 Received: by vdcrexc1.orange.ch with Internet Mail Service (5.5.2650.21) id ; Thu, 14 Sep 2000 10:17:42 +0200 Message-ID: <2B26E094BB13D3118FB3006008214FA5F06EEF@vdlaexc0.orange.ch> From: Kitching Simon To: "'tomcat-user@jakarta.apache.org'" Subject: RE: dynamic includes. Date: Thu, 14 Sep 2000 10:17:40 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N 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 >