You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tom Fennelly <ne...@hotmail.com> on 2002/11/29 09:37:38 UTC

Re: Modify Jasper compiler input??? (tomcat 4.1.12)

I'm very sorry - Tomcat version 4.1.12


>From: "Tom Fennelly" <ne...@hotmail.com>
>Reply-To: "Tomcat Developers List" <to...@jakarta.apache.org>
>To: tomcat-dev@jakarta.apache.org
>Subject: Modify Jasper compiler input???
>Date: Fri, 29 Nov 2002 08:31:23 +0000
>
>Hi,
>
>Being a newbie to this mailing list, I hope I don't upset anyone!!
>
>What I'm trying to figure out is:
>Are there any hooks in Jasper that would allow manipulation of its internal 
>representation of the JSP page prior to compilation?
>
>I.e modify compiler input.
>
>Simple example:
>=========== Source JSP ============
><html>
>	<body>
>		Hello World!!
>	</body>
></html>
>========= JSP Compiler Input =========
>...some useragent eval code...
><% if(useragent == HTML) { %>
>	<html>
>		<body>
>			Hello World!!
>		</body>
>	</html>
><% } else if(useragent == WML) { %>
>	<wml>
>		<card>
>			<p>
>				Hello World!!
>			</p>
>		</card>
>	</wml>
><% } %>
>=================================
>
>Having had a look at the code I don't see any mechanism to do this but 
>maybe I'm looking in the wrong place.  I would have expected to see the 
>likes of this in around org.apache.jasper.compiler.Compiler.generateJava(). 
>  It parses the JSP to a org.apache.jasper.compiler.Node.Nodes model - this 
>seems like the structure I'd need access to (???).
>
>Perhaps this is Heresy in terms of JSP/Servlet spec conformance, I'm 
>probably not informed enough.  Hope someone can help.
>
>Regards,
>
>Tom Fennelly.
>
>
>
>
>
>
>_________________________________________________________________
>Protect your PC - get McAfee.com VirusScan Online 
>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
>--
>To unsubscribe, e-mail:   
><ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>