tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21390] New: - Incorrect code generated by the jsp compiler
Date Tue, 08 Jul 2003 02:34:56 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21390>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21390

Incorrect code generated by the jsp compiler

           Summary: Incorrect code generated by the jsp compiler
           Product: Tomcat 5
           Version: 5.0.3
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: rail@actuate.com


Hi,

This problem seems to have started with the 4.1 release of tomcat.
It was working fine in 4.0.
I have 2 tags on a jsp page.
Both of them expose variables with the same name and this results in the jsp
compiler from 4.1 and above giving the follwing compilation error.

Generated servlet error:
    [javac] Compiling 1 source file

C:\apps\jakarta-tomcat-5.0.3\work\Catalina\localhost\oracletest\org\apache\jsp\test_jsp.java:95:
cannot resolve symbol
symbol  : variable Message 
location: class org.apache.jsp.test_jsp
      Message = (String) pageContext.findAttribute("Message");
      ^



An error occurred at line: 17 in the jsp file: /test.jsp

Generated servlet error:
C:\apps\jakarta-tomcat-5.0.3\work\Catalina\localhost\oracletest\org\apache\jsp\test_jsp.java:96:
cannot resolve symbol
symbol  : variable prop 
location: class org.apache.jsp.test_jsp
      prop = (test.TempProperties) pageContext.findAttribute("prop");
      ^



An error occurred at line: 19 in the jsp f


The following is the jsp page


<%@ taglib uri="/test" prefix="test" %>

<%
int i = 0;
{
%>
	<test:test/>

Message 1: <%= Message %><br>
<%= prop.getProperty("one") %><br>

<%
}

{
%>
	<test:test1/>

Message 2: <%= Message %><br>
<%= prop.getProperty("two") %>
<%
}
%>


I can send you a zip file containing the entire web application so that you can
check this out.

Can you please let me know, since this is a serious regression according to me.


Thanks,


Roshan

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


Mime
View raw message