Originally posted by Jeff Sunder:
Hi,
I am just starting out in jsp. I have a jsp page that depends on a connection pooling class (which is not a jsp page or a servlet, just a class file). I put the jsp page in the same directory as the .class file of the connection pool. But when I invoke the jsp page, I get an error message that says the connection pool cannot be found. Is there something I have to do to get this helper class working with the jsp file? Here is the error message:
Error: 500
Location: /src/ProjectStatus.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSPC:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:65: Class src.ConnectionPool not found.
ConnectionPool connPool = null;
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:67: Class src.ConnectionPool not found.
connPool = new ConnectionPool(jdbcDriver, dbURL, "projects", "projects");
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:79: Undefined variable: dbConn
dbConn = connectionPool.getConnection();
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:79: Undefined variable or class name: connectionPool
dbConn = connectionPool.getConnection();
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:80: Class src.Statement not found.
Statement stmt = dbConn.createStatement();
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:80: Undefined variable or class name: dbConn
Statement stmt = dbConn.createStatement();
^
C:\Documents and Settings\sbarkho\jbproject\UI_Projects\work\localhost_8080\_0002fsrc_0002fProjectStatus_0002ejspProjectStatus_jsp_0.java:84: Class src.ResultSet not found.
ResultSet rs = stmt.executeQuery(getProjects);
^
7 errors
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:247)
at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at com.borland.jbuilder.webserverglue.tomcat.jsp.JspLoaderEcho.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:484)
Thanks in advance
Sarath Mohan
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|