You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Alf Scherer <al...@gmx.net> on 2002/03/12 19:53:13 UTC
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
---------------------------------------------------------
RE: JSP parsing bug?
Posted by Alf Scherer <al...@gmx.net>.
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
RE: JSP parsing bug?
Posted by Tomas Rokicki <ro...@instantis.com>.
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>