Here is the code I'm trying to use:

Code:
<&#37;
String mysql_DRIVER = "com.mysql.jdbc.Driver";
String mysql_USERNAME = "hre3oadmin";
String mysql_PASSWORD = "@Room15";
String mysql_STRING = "jdbc:mysql://10.10.100.200:3306/hreo_main_db";

Connection connection = null;

Class.forName("com.mysql.jdbc.Driver").newInstance();
connection = DriverManager.getConnection(mysql_STRING,mysql_USERNAME,mysql_PASSWORD);

if(!connection.isClosed())
	out.println("Successfully connected to " + "MySQL server using TCP/IP...");
	connection.close();
}
catch(Exception ex){
	out.println("Unable to connect to database.");
}

%>
The error I get is as follows:
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.questionnaire.classes.mysql_jsp
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
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:618)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
I'm thinking I'm not pointing to the mysql driver correctly.

I have mysql-connector-java-5.1.7-bin.jar in the following directories:
  • /exit/WEB-INF/classes/lib
  • /exit/WEB-INF/lib
  • /exit/WEB-INF


Any help I can get would be incredibly appreciated. I've never touched JSP a day in my life... it's a lot more difficult than PHP it seems .

Thanks