You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Moran, David (David)" <da...@att.com> on 2000/12/19 23:49:30 UTC

Compile Error in JSP generated servlet

What would cause JSP to generate the same variable in the generated servlet.
I am getting the following compile error in the JSP generated servlet in
tomcat 3.2 on Windows NT.  I am trying to get the book examples to run from
"SE Using Java Server Pages and Servlets"

Error: 500

Location: /examples/examples/ShowPeople.jsp

Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for
JSPD:\java\servlet\jakarta-tomcat-3.2\work\localhost_8080%2Fexamples\_0002fe
xamples_0002fShowPeople_0002ejspShowPeople_jsp_0.java:75: Variable '_tmpS'
is already defined in this method.
                    String [] _tmpS = new String[7];
                              ^
D:\java\servlet\jakarta-tomcat-3.2\work\localhost_8080%2Fexamples\_0002fexam
ples_0002fShowPeople_0002ejspShowPeople_jsp_0.java:83: Variable '_tmpS' is
already defined in this method.
                    String [] _tmpS = new String[7];
                              ^


This is the offending code from the servlet

// begin
[file="D:\\java\\servlet\\jakarta-tomcat-3.2\\webapps\\examples\\examples\\S
howPeople.jsp";from=(14,0);to=(46,14)]
                {
                    String _jspx_qStr = "";
                    _jspx_qStr = _jspx_qStr + "?tableOptions=" + "BORDER=4";
                    String [] _tmpS = new String[7];
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    _jspx_qStr = _jspx_qStr + "&columnType=" + "data";
                    String [] _tmpS = new String[7];
                    _jspx_qStr = _jspx_qStr + "&column=" + "name";
                    _jspx_qStr = _jspx_qStr + "&column=" + "age";
                    _jspx_qStr = _jspx_qStr + "&column=" + "city";
                    _jspx_qStr = _jspx_qStr + "&column=" + "state";
                    _jspx_qStr = _jspx_qStr + "&column=" + "country";
                    _jspx_qStr = _jspx_qStr + "&column=" + "postalCode";
                    _jspx_qStr = _jspx_qStr + "&column=" + "email";
                    String [] _tmpS = new String[7];
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Name";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Age";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "City";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "State";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Country";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "Postal
Code";
                    _jspx_qStr = _jspx_qStr + "&columnHeader=" + "E-Mail";
                    _jspx_qStr = _jspx_qStr + "&data=" + "people";
                    pageContext.include("TableServlet" + _jspx_qStr);
                }