tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Supreme Being" <supremebe...@hoboe.com>
Subject RE: [ClassPath] JSP, JDBC, and mm.MySql
Date Fri, 01 Jun 2001 19:21:32 GMT
Jon,

i'm not too sure about Apache, i don't use that one for JSP. I'm running JRun for my JSP.
I do use Apache for PHP though. It took me a long time setting up a mySQL connection using
JSP before someone told me that there is no need for any CLASSPATH inclusions in the bat file.
CLASSPATH was not required. Only thing needed to be done was placing the "mysql.jar" file
in the /servers/lib folder of my JRun. And voila...it worked. Apache has a /lib folder too,
trying placing the jar file thier and see if it works...

SupremeBeing


>Date:         Thu, 17 May 2001 23:49:16 -0500
>Reply-To: tomcat-user@jakarta.apache.org
>From: Jon Shoberg <jshoberg@CBD.NET>
>SUBJECTTo: JSP-INTEREST@JAVA.SUN.COM
>
>        Its getting late but I'm not having too much luck at getting a sucessful
>JSP / mysql connection.  Given the error message below can someone explain
>where I should be setting my class path and the actual mm.mysql files or the
>entire jar file? I am using jdk1.3 with the latest apache on win2K pro.
>
>        My JSP page looks like and the error is below:
>
><html>
>  <head>
>    <title>Login</title>
>  </head>
><%@ page import="java.sql.*, java.io.*" %>
><%
>  // Step 1: registering the MySQL JDBC driver
>
>  try {
>    // The newInstance() call is a work around for some
>    // broken Java implementations
>    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
>  }
>  catch (Exception E) {
>    out.println("<br><br>some crap<br><br>Unable to load
>driver.<br><br><br><br>");
>    E.printStackTrace(new PrintWriter(out));
>  }
>
>
>%>
>
></html>
>
>error:
>
>
>java.lang.ClassNotFoundException: Unable to load class
>org.gjt.mm.mysql.Driver at
>org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:223) at
>org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147) at
>java.lang.ClassLoader.loadClass(ClassLoader.java:253) at
>java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at
>java.lang.Class.forName0(Native Method) at
>java.lang.Class.forName(Class.java:120) at
>_0002fsql_0002ejspsql_jsp_7._jspService(_0002fsql_0002ejspsql_jsp_7.java:70)
>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>va:177) at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at
>org.apache.tomcat.core.Handler.service(Handler.java:286) at
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>at
>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
>(Ajp12ConnectionHandler.java:166) at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>at java.lang.Thread.run(Thread.java:484)
>
>===========================================================================
>To unsubscribe: mailto listserv@java.sun.com with body: "signoff JSP-INTEREST".
>For digest: mailto listserv@java.sun.com with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===========================================================================
>To unsubscribe: mailto listserv@java.sun.com with body: "signoff JSP-INTEREST".
>For digest: mailto listserv@java.sun.com with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



******************
>From my right-eye i create all for myself, from the left-eye i accept all that there is
otherwise. It is nothing more than what i deserve, for i am the Supreme Being
******************

------------------------------------------------------------
Are you a Hoboe?  Hobnob at http://www.hoboe.com
Click here -> http://www.hoboe.com Global Mail Access

Mime
View raw message