tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Moran, David (David)" <davidmo...@att.com>
Subject RE: Compile Error in JSP generated servlet
Date Wed, 20 Dec 2000 16:45:16 GMT


-----Original Message-----
From: Kitching Simon [mailto:Simon.Kitching@orange.ch]
Sent: Wednesday, December 20, 2000 10:50 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: Compile Error in JSP generated servlet


David,

How about posting the original jsp source code?

The problem *is* probably somewhere in there,
and even if it isn't, most people (like me) are
unlikely to give too much attention to a possible
problem in tomcat unless we can see for
ourselves that there is nothing wrong with the
original jsp...

Cheers,

Simon

> -----Original Message-----
> From:	Moran, David (David) [SMTP:davidmoran@att.com]
> Sent:	Wednesday, December 20, 2000 4:41 PM
> To:	'tomcat-user@jakarta.apache.org'
> Subject:	RE: Compile Error in JSP generated servlet
> 
> But I'm not doing it.  The JSP engine is doing it. 
> 
> -----Original Message-----
> From: Morahg, Yoav [mailto:Ymorahg@gist.com]
> Sent: Wednesday, December 20, 2000 9:52 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: Compile Error in JSP generated servlet
> 
> 
> You are declaring the String array twice in your code.
> 
> The first one is okay...
> 
> String [] _tmpS = new String[7];
> 
> but you can't do this again in your code. If you want to create a new
> String
> array for _tmpS after already declaring _tmpS you should do it without
> declaring it...
> 
> _tmpS = new String[7];
> 
> Hope this helps.
> 
> -Y
> 
> ---------------------------
> Yoav Morahg
> Software Engineer
> Gist Communications
> (212) 965-1999 xt 110
> ymorahg@gist.com
> 
> Interactive Television Guides
> 
> 
> -----Original Message-----
> From: Moran, David (David) [mailto:davidmoran@att.com]
> Sent: Tuesday, December 19, 2000 5:50 PM
> To: tomcat-user@jakarta.apache.org
> Subject: 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\_0002
> fe
> 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\_0002fex
> am
> 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);
>                 }


Mime
View raw message