tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alf Scherer" <alf.sche...@gmx.net>
Subject RE: JSP parsing bug?
Date Wed, 13 Mar 2002 09:43:01 GMT
All right :)

Thanks.

-----Original Message-----
From: Tomas Rokicki [mailto:rokicki@instantis.com] 
Sent: Tuesday, March 12, 2002 8:05 PM
To: Tomcat Developers List
Subject: RE: JSP parsing bug?


This isn't a bug; this is according to spec.  The parsing
of the <%...%> is done first, independent of whatever bytes might be in
there.  Thus, your code looks to the JSP compiler like

A declaration consisting of
"

	// <% comment "

Literal content consisting of
"

	final static int SOME_INT = 0xFFFFFFFFF;

	public void someMethod(){

	}
%>
This page demonstrates a parsing bug"

So, I'd say, no bug.  Just a common misunderstanding.

-tom

-----Original Message-----
From: Alf Scherer [mailto:alf.scherer@gmx.net]
Sent: Tuesday, March 12, 2002 10:53 AM
To: Tomcat Developers List
Subject: JSP parsing bug?


Hi,

I've discovered something that looks like a bug to me, although I'm not
sure whethter this should/can be classified as a bug. The following
behavour occurs when you put "<% %>"-JSP tags inside a java comment in a
JSP file. The code following the comment will be displayed on the page
when requesting the file.


You can try the following code snippet to see how it works out.

---- snip ----
<%!

	// <% comment %> 

	final static int SOME_INT = 0xFFFFFFFFF;

	public void someMethod(){

	}
%>
This page demonstrates a parsing bug
---- snip ----

Cya,
Alf


---------------------------------------------------------
 Alf Scherer        |
                    |
 CarrotMEDIA GmbH   |
 Saegewerkstr. 3    | Q: What is a programmer?
 83395 Freilassing  | A: A bio-chemical machine, turning 
 Germany, EU        |    coffee into lines of code
--------------------------------------------------------- 


--
To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>

Mime
View raw message