Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 1921 invoked from network); 20 Dec 2000 16:45:51 -0000 Received: from ckmso1.att.com (HELO ckmso1.proxy.att.com) (12.20.58.69) by locus.apache.org with SMTP; 20 Dec 2000 16:45:51 -0000 Received: from gcscexc1.ims.att.com ([135.89.3.72]) by ckmso1.proxy.att.com (AT&T IPNS/MSO-3.0) with ESMTP id eBKGjLG08803 for ; Wed, 20 Dec 2000 11:45:21 -0500 (EST) Received: by gcscexc1.ims.att.com with Internet Mail Service (5.5.2653.19) id ; Wed, 20 Dec 2000 11:45:15 -0500 Message-ID: <87F7409F21E4D111A96600805FE65C020881B5A2@GCSCEXC5> From: "Moran, David (David)" To: "'tomcat-user@jakarta.apache.org'" Subject: RE: Compile Error in JSP generated servlet Date: Wed, 20 Dec 2000 11:45:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C06AA4.3AE39CB0" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C06AA4.3AE39CB0 Content-Type: text/plain; charset="iso-8859-1" -----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); > } ------_=_NextPart_000_01C06AA4.3AE39CB0 Content-Type: application/octet-stream; name="ShowPeople.jsp" Content-Disposition: attachment; filename="ShowPeople.jsp" The following people matched your search criteria:

<%-- Invoke the Table servlet, tell it the name of the attribute where the data is stored (data=people), set the border size to 4 on the tag, and describe each column to display. The "people" attribute was sent from the controller servlet and contains a vector of people objects. --%> ------_=_NextPart_000_01C06AA4.3AE39CB0--