Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 48033 invoked from network); 25 Jul 2005 22:15:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jul 2005 22:15:08 -0000 Received: (qmail 83430 invoked by uid 500); 25 Jul 2005 22:14:50 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 83243 invoked by uid 500); 25 Jul 2005 22:14:49 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 83230 invoked by uid 99); 25 Jul 2005 22:14:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 15:14:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [216.18.0.114] (HELO mx3.grouptelecom.net) (216.18.0.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 15:14:43 -0700 Received: from ADILEMAIN (cgdist1-e10-0-4.cg.sfl.net [139.142.0.161]) by mx3.grouptelecom.net (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with SMTP id <0IK700KMGF5H2W@mx3.grouptelecom.net> for tomcat-user@jakarta.apache.org; Mon, 25 Jul 2005 15:15:18 -0700 (PDT) Date: Mon, 25 Jul 2005 16:20:26 -0600 From: Adile Abbadi Subject: RE: Error 500 messages In-reply-to: <42E39B9F.7080509@joedog.org> To: Tomcat Users List Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Content-type: text/plain; charset=windows-1250 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Tim, Thanx for this again - sorry to be a pain - but this is good info - so the bugger size value is a jsp page directive? I'll check into it - but if you can confirm I would appreciate it. Thanx Adile -----Original Message----- From: Tim Funk [mailto:funkman@joedog.org] Sent: July 24, 2005 7:46 AM To: Tomcat Users List Subject: Re: Error 500 messages The response is being comitted before the erro is being thrown. You need to set the buffer size to be larger. Its a page directive. -Tim Adile Abbadi wrote: > Hi Tim, > > Thank you very much - that has helped - however I discovered that the > problem still exists if I have an include within an include - ie. > > I have an include called this > > > > Inside that include I have another include also with flush set to false - > and I still get a blank page - however if I remove the includes within the > include then the exception is visible. Any ideas on this? > > Cheers > > Adile > > > -----Original Message----- > From: Tim Funk [mailto:funkman@joedog.org] > Sent: July 22, 2005 12:42 PM > To: Tomcat Users List > Subject: Re: Error 500 messages > > > flush="false" > > -Tim > > Adile Abbadi wrote: > > >>Hi Tim, >> >>Thanx for the information - I forgot about that. I guess the question is > > why > >>did it work in Tomcat 3 and not Tomcat 4 and second is there a workaround > > to > >>get it to work? >> >>Adile >> >> >>-----Original Message----- >>From: Tim Funk [mailto:funkman@joedog.org] >>Sent: July 22, 2005 12:20 PM >>To: Tomcat Users List >>Subject: Re: Error 500 messages >> >> >>This line will commit the >>response >>and send html back to the client. Once that is done - no error messages > > will > >>be sent back to the client and you will end up with a blank screen. >> >>-Tim >> >>Adile Abbadi wrote: >> >> >> >>>Hi Rob, >>> >>>Thanx for this - this is great - I may have to use this because I think I >>>have truly found a bug in Tomcat as this issue is not happening on my >> >>Tomcat >> >> >>>3 server. I did a bit more investigation and I found some interesting >>>things. This is going to be a long email with code and stuff but whoever >>>wants to read it please do - because the results are weird. >>> >>>I created the following simple JSP page >>> >>><%@ page language="java" >>>import="javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager" %> >>><%^M >>> String query = "select * from patient_info where ref_client = 38 >> >>and >> >> >>>pat_lname like '%SM'ITH%';"; >>> DBConnectionManager connMgr; >>> connMgr = DBConnectionManager.getInstance(); >>> Connection Conn = connMgr.getConnection("podb"); >>> Statement SQLS = Conn.createStatement(); >>> ResultSet rs = SQLS.executeQuery(query); >>> String col1 = null; >>> String col2 = null; >>> while(rs.next()) { >>> col1 = rs.getString("pat_id"); >>> col2 = rs.getString("pat_fname"); >>>%> >>><%=col1%>: <%=col2%>
>>>
>>><% >>> } >>> rs.close(); >>> SQLS.close(); >>> connMgr.freeConnection("podb",Conn); >>>%> >>> >>>As you can see I did a syntax error in the query and the error comes to >> >>the >> >> >>>screen as expected >>> >>>javax.servlet.ServletException: ERROR: syntax error at or near "ITH" at >>>character 74 >>> >>>I said that's weird so I tried to compare my complicated JSP files to what >> >>I >> >> >>>have here to see what is different (if I did something wrong) and I found >>>this >>> >>>If I add an include at certain parts of the page - I see the result I was >>>talking about. For example if I do this: >>> >>> >>><%@ page language="java" >>>import="javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager" %> >>><%^M >>> String query = "select * from patient_info where ref_client = 38 >> >>and >> >> >>>pat_lname like '%SM'ITH%';"; >>> DBConnectionManager connMgr; >>> connMgr = DBConnectionManager.getInstance(); >>> Connection Conn = connMgr.getConnection("podb"); >>> Statement SQLS = Conn.createStatement(); >>> ResultSet rs = SQLS.executeQuery(query); >>> String col1 = null; >>> String col2 = null; >>> while(rs.next()) { >>> col1 = rs.getString("pat_id"); >>> col2 = rs.getString("pat_fname"); >>>%> >>><%=col1%>: <%=col2%>
>>>
>>><% >>> } >>> rs.close(); >>> SQLS.close(); >>> connMgr.freeConnection("podb",Conn); >>>%> >>> >>>I get the error page as I should - however If I move the include to below >>>the <%@ page language="java".... - I get a blank page!! >>> >>>Now here is where it gets weirder - if I force a java syntax error like as >>>follows (I corrected the query): >>> >>> >>><%@ page language="java" >>>import="javax.crypto.*,java.sql.*,java.net.*,dbc.DBConnectionManager" %> >>><%^M >>> String query = "select * from patient_info where ref_client = 38 >> >>and >> >> >>>pat_lname like '%SMITH%';"; >>> DBConnectionManager connMgr; >>> connMgr = DBConnectionManager.getInstance(); >>> Connection Conn = connMgr.getConnection("podb"); >>> Statement SQLS = Conn.createStatement(); >>> ResultSet rs = SQLS.executeQuery(query); >>> String col1 = null; >>> String col2 = null; >>> if (col1.equals("yes") { >>> //test >>> } >>> while(rs.next()) { >>> col1 = rs.getString("pat_id"); >>> col2 = rs.getString("pat_fname"); >>>%> >>><%=col1%>: <%=col2%>
>>>
>>><% >>> } >>> rs.close(); >>> SQLS.close(); >>> connMgr.freeConnection("podb",Conn); >>>%> >>> >>>An error will get thrown to the screen >>> >>>org.apache.jasper.JasperException: Unable to compile class for JSP >>> >>>An error occurred at line: 2 in the jsp file: /testdb.jsp >>> >>>/var/lib/tomcat4/work/Standalone/localhost/podims/testdb_jsp.java:57: ')' >>>expected >>> if (col1.equals("yes") { >>> >>>However if I try to force a null pointer error by correcting my syntax >>>error - I get a blank screen! If remove the include I get the null pointer >>>error no problem. The other behaviour I noticed as well is that as I said >>>before if the include is above the <%@ page language.... piece it works >>>fine - only if its an html - if its another jsp file - I get a blank >> >>screen >> >> >>>as well. >>> >>>So has anyone else seen this behaviour - is there a fix or a work around - >>>should I got back to Tomcat 3?? I'm going to try your suggestion Rob and >> >>see >> >> >>>if that helps at all, but to me its seems like an issue with the JSP >>>compiler. >>> >>>Cheers >>> >>>Adile >>> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >> >>-- >>No virus found in this incoming message. >>Checked by AVG Anti-Virus. >>Version: 7.0.338 / Virus Database: 267.9.2/55 - Release Date: 7/21/05 >> >>-- >>No virus found in this outgoing message. >>Checked by AVG Anti-Virus. >>Version: 7.0.338 / Virus Database: 267.9.2/55 - Release Date: 7/21/05 >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.2/55 - Release Date: 7/21/05 > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.2/55 - Release Date: 7/21/05 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 7/22/05 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 7/22/05 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org