Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 27354 invoked from network); 26 Jul 2007 10:03:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jul 2007 10:03:49 -0000 Received: (qmail 42549 invoked by uid 500); 26 Jul 2007 10:03:37 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 42525 invoked by uid 500); 26 Jul 2007 10:03:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 42513 invoked by uid 99); 26 Jul 2007 10:03:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 03:03:37 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jotnarta@gmail.com designates 64.233.162.233 as permitted sender) Received: from [64.233.162.233] (HELO nz-out-0506.google.com) (64.233.162.233) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2007 03:03:35 -0700 Received: by nz-out-0506.google.com with SMTP id z6so403892nzd for ; Thu, 26 Jul 2007 03:03:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=JvolX0XL9YF4eOKvotcKe4D6a7rD2BXLWCsrXwZZLd7+zUJb3qKxku0YpkjIV6X01YZQ1NKfVlMF3UBu5sKgSNtXgebnGrVofT4nnUYtfZ/rgxnU92s1T1olMLufpYSg4QTMA4TbCTQ7exa0y3k3wKs/NZABoLlG5cajEbEdHUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Z6qVZm0OdnuSt7+0W+kj7FzWqTT3iizCC2Ovqs3n+9ABdR1ATFxxfO/fonxV0zdhpQuC1uEl4n/wFUgU46DLxfbHE25TcgMfkkFketXJuaKwhUE2a9t894PK7wltHREYA9JN0d5sP/naCeEodc2VZfRLfPfYYGfHrdZa94mB9W0= Received: by 10.142.252.11 with SMTP id z11mr106941wfh.1185444193560; Thu, 26 Jul 2007 03:03:13 -0700 (PDT) Received: by 10.142.100.7 with HTTP; Thu, 26 Jul 2007 03:03:13 -0700 (PDT) Message-ID: <9c2eb70e0707260303l3d4dfa5aq1b69909795d659f9@mail.gmail.com> Date: Thu, 26 Jul 2007 13:03:13 +0300 From: "Mohammed Zabin" To: "Tomcat Users List" Subject: Re: MySql Connector In-Reply-To: <46A86FF5.6070002@cornell.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4149_22681892.1185444193500" References: <9c2eb70e0707220136j2360df3dsab63edd553405779@mail.gmail.com> <46A32074.4020500@pidster.com> <9c2eb70e0707220232l5ddfac7bnfd49ef3308452cad@mail.gmail.com> <46A4A20E.4070501@cornell.edu> <9c2eb70e0707240417q2ba41ed3hc32a50873e02941f@mail.gmail.com> <46A76966.1020902@christopherschultz.net> <9c2eb70e0707260217w720ea963iff1070d866dca533@mail.gmail.com> <46A86FF5.6070002@cornell.edu> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_4149_22681892.1185444193500 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline It's already wrapped man, i just copied the code snippet from within <%%> marker ;), and for System.out, or out.println, It's still the same problem. If you looked at the exception you will find ClassNotFoundException at line 66 in the generated servlet, and this occurs withing the try block, so, i think it's a problem of Connector. But the strange thing is that this code worked fine on a normal java class??? On 7/26/07, David Smith wrote: > > 1. This can't be the complete jsp code. If it is, you need to minimally > wrap it in <% %> markers to indicate it's raw java code, not > jsp/html. Additionally your System.out.println() call would end up > going to the JVM's standard output instead of the browser. > > 2. The listed exception is really secondary to the main problem > occurring whenever the jsp compile fails to generate a .class file. > There has to be an earlier exception detailing the syntax problems with > the jsp. > > --David > > Mohammed Zabin wrote: > > This is my jsp code: > > try { > > Class.forName("org.gjt.mm.mysql.Driver"); > > String url = "jdbc:mysql://localhost:3306/exam"; > > Connection con = DriverManager.getConnection(url,"root", > "exam"); > > Statement stmt = con.createStatement(); > > ResultSet rs = stmt.executeQuery("Select type from > > questions"); > > > > while( rs.next() ) { > > System.out.println( rs.getString("type") ); > > } > > > > } catch( Exception e ) { > > } > > > > and this is what i got: > > > > *exception* > > > > org.apache.jasper.JasperException: org.apache.jasper.JasperException: > > Unable to load class for JSP > > org.apache.jasper.servlet.JspServletWrapper.getServlet( > JspServletWrapper.java:154) > > org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:320) > > org.apache.jasper.servlet.JspServlet.serviceJspFile( > JspServlet.java:320) > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > *root cause* > > > > org.apache.jasper.JasperException: Unable to load class for JSP > > org.apache.jasper.JspCompilationContext.load( > JspCompilationContext.java:600) > > org.apache.jasper.servlet.JspServletWrapper.getServlet( > JspServletWrapper.java:142) > > org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:320) > > org.apache.jasper.servlet.JspServlet.serviceJspFile( > JspServlet.java:320) > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > *root cause* > > > > java.lang.ClassNotFoundException: org.apache.jsp.mySql_jsp > > java.net.URLClassLoader$1.run(URLClassLoader.java:200) > > java.security.AccessController.doPrivileged(Native Method) > > java.net.URLClassLoader.findClass(URLClassLoader.java:188) > > org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java > :134) > > org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java > :66) > > org.apache.jasper.JspCompilationContext.load( > JspCompilationContext.java:598) > > org.apache.jasper.servlet.JspServletWrapper.getServlet( > JspServletWrapper.java:142) > > org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:320) > > org.apache.jasper.servlet.JspServlet.serviceJspFile( > JspServlet.java:320) > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > > > > > Any suggestions, please? > > > > On 7/25/07, Christopher Schultz wrote: > > > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Mohammed, > >> > >> Mohammed Zabin wrote: > >> > >>> I have the following error: > >>> > >>> org.apache.jasper.JasperException: Unable to compile class for JSP: > >>> > >> Uhh... you have a syntax error in your JSP code. Fix that, then we'll > >> get back to configuration issues. You didn't give enough information to > >> help with the JSP syntax error. > >> > >> - -chris > >> > >> -----BEGIN PGP SIGNATURE----- > >> Version: GnuPG v1.4.7 (MingW32) > >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >> > >> iD8DBQFGp2lm9CaO5/Lv0PARAvlRAJ45KuixS2Fy75ssMLQLwUYhA+DjOACgtiTN > >> nZhKt8DoIGh8UFwV+Ri6qWI= > >> =syvt > >> -----END PGP SIGNATURE----- > >> > >> --------------------------------------------------------------------- > >> To start a new topic, e-mail: users@tomcat.apache.org > >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> For additional commands, e-mail: users-help@tomcat.apache.org > >> > >> > >> > > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > ------=_Part_4149_22681892.1185444193500--