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 19614 invoked from network); 14 Sep 2000 05:17:52 -0000 Received: from ns1.megapath.net (HELO megapathdsl.net) (216.200.176.4) by locus.apache.org with SMTP; 14 Sep 2000 05:17:52 -0000 Received: from [64.7.6.7] (HELO invasion) by megapathdsl.net (CommuniGate Pro SMTP 3.3.1) with SMTP id 4019656 for tomcat-user@jakarta.apache.org; Wed, 13 Sep 2000 22:17:58 -0700 From: "Luis Andrei Cobo" To: Subject: RE: dynamic includes. Date: Thu, 14 Sep 2000 01:15:31 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 In-Reply-To: <39C057EF.2587FDD9@vecnatech.com> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N if you can actually solve this one, I'd pay big bucks. Unfortunately, there doesnt seem to be much by way of support fo parametric includes in JSP, or ASP for that matter Perhaps however, someone will catch on that this could be a relatively good thing, and write an extention for _jspservice or something which handles this. I worked with a psuedo-programming language ( more of a syntactical interface over java) which took anything as a parameter for a file include (parsable 100%). It was a scripting type of language called "Borscht" which was developed by Organic I beleive. It was very unusual, and had it own unique brand of syntax and grammar. on the server side was servlets that would interpret the syntax, intercepting commands to other servlets, which led to an interesting beldn fo server/client programming, although somewhat expensive on the machines. The includes were parsed on the server by a servlet which would simply accept the concantenation of strings as file arguments and include them in the resulting parsing, which would yeild some interesting results, however those files were required to be .HTML files even if there were snippets of "borscht" code in them. It was certainly exciting though since it yeilded some fabulously dynamic templates. I personally would LOVE to have this mechanism in JSP. Ive worked with it for a long time and am sorry to see it not in standard programming. There is probably the concern that the JSP would have to be recompiled Everytime an include argument changes, and even if it doesnt change, it would natually assume it has and recompile, which would exhaust system resources a great deal. Oddly, considering the performance impact in JSP, with compilation issues, im SUPER surprised that a lanugage like ASP can not handle this sort ot technique considering that the page parses out every time you load it anyhow.!! There is a dirty alternative, one thats not glamourous, which will allow only HTML tags to actually work, and that would be to use a FileReader /inputStream to write a file directly to the page. Only HTML would actually parse out, but all JSP tags would simply show up as text on the resulting page. Luis Andrei Cobo -----Original Message----- From: theo@vecnatech.com [mailto:theo@vecnatech.com] Sent: Thursday, September 14, 2000 12: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. The objective is to include one of several files based on a parameter in my profile object. Any help would be greatly appreciated.... theo