Bug report #655 has just been filed. You can view the report at the following URL: <http://znutar.cortexity.com/BugRatViewer/ShowReport/655> REPORT #655 Details. Project: Jasper Category: Bug Report SubCategory: New Bug Report Class: swbug State: received Priority: medium Severity: serious Confidence: public Environment: Release: Tomcat-4.0-m5 JVM Release: 1.3 Operating System: NT OS Release: 4.0 Platform: x86 Synopsis: Compiler error concerning jsp:include tag Description: Possible error in IncludeGenerator.java, line 156: writer.println("String [] _tmpS = new String[" + value.length +"];"); Writes same string to generated code possibly multiple times. Problem is can't declare same variable more than once in a Java code block - compiler complains. Also note this line appears to be useless since _tmpS is never used. (Possible leftover from previous version :) Example code that produces error situation: <jsp:include page="/servlet/usingjsp.TableServlet" flush="true"> <jsp:param name="data" value="people"/> <jsp:param name="tableOptions" value="BORDER=4"/> <jsp:param name="column" value="name"/> <jsp:param name="columnType" value="data"/> <jsp:param name="columnHeader" value="Name"/> <jsp:param name="column" value="age"/> <jsp:param name="columnType" value="data"/> <jsp:param name="columnHeader" value="Age"/> <jsp:param name="column" value="getPhoneNumber"/> <jsp:param name="columnType" value="data"/> <jsp:param name="columnHeader" value="Phone #"/> </jsp:include> Produces following code from jsp compiler: String _jspx_qStr = ""; String [] _tmpS = new String[3]; _jspx_qStr = _jspx_qStr + "?columnType=" + "data"; _jspx_qStr = _jspx_qStr + "&columnType=" + "data"; _jspx_qStr = _jspx_qStr + "&columnType=" + "data"; _jspx_qStr = _jspx_qStr + "&tableOptions=" + "BORDER=4"; _jspx_qStr = _jspx_qStr + "&data=" + "people"; String [] _tmpS = new String[3]; _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Name"; _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Age"; _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Phone #"; String [] _tmpS = new String[3]; _jspx_qStr = _jspx_qStr + "&column=" + "name"; _jspx_qStr = _jspx_qStr + "&column=" + "age"; _jspx_qStr = _jspx_qStr + "&column=" + "getPhoneNumber"; pageContext.include("/servlet/usingjsp.TableServlet" + _jspx_qStr); Note the 3 ocurrences of String [] _tmpS = new String[3]; in the above code. Compiler Complaint: Error: 500 Location: /examples/jspbook/Chap07/ShowTable.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta-tomcat-3.2.1\work\localhost_8080%2Fexamples\_0002fjspbook_0002fChap_00030_00037_0002fShowTable_0002ejspShowTable_jsp_0.java:115: Variable '_tmpS' is already defined in this method. String [] _tmpS = new String[3]; ^ C:\jakarta-tomcat-3.2.1\work\localhost_8080%2Fexamples\_0002fjspbook_0002fChap_00030_00037_0002fShowTable_0002ejspShowTable_jsp_0.java:119: Variable '_tmpS' is already defined in this method. String [] _tmpS = new String[3]; ^ 2 errorsTitle: BugRat Report # 655
BugRat Report # 655
Project: Jasper | Release: Tomcat-4.0-m5 |
Category: Bug Report | SubCategory: New Bug Report |
Class: swbug | State: received |
Priority: medium | Severity: serious |
Confidence:
public
|
Submitter:
Paul Fernandes ( [EMAIL PROTECTED] )
Date Submitted:
Dec 22 2000, 10:37:35 CST
Responsible:
Z_Tomcat Alias ( [EMAIL PROTECTED] )
- Synopsis:
- Compiler error concerning jsp:include tag
- Environment: (jvm, os, osrel, platform)
- 1.3, NT, 4.0, x86
- Additional Environment Description:
- Report Description:
-
Possible error in IncludeGenerator.java, line 156:
writer.println("String [] _tmpS = new String[" + value.length +"];");
Writes same string to generated code possibly multiple times.
Problem is can't declare same variable more than once in a Java code block - compiler complains.
Also note this line appears to be useless since _tmpS is never used. (Possible leftover from previous version :)
Example code that produces error situation:
- How To Reproduce:
- null
- Workaround:
- null