Title: RE: Tomcat error while using a class with JSP!
Hi everybody,
 
   I'm really new to Tomact and I'm facing this problem.

     I have put the classes in the package and Tomcat is now able to recognize that. Now It is not recognizing the Oracle drivers which I have them in C:\Jdbcdrivers as classes12.zip and added in CLASSPATH but When I call it from jsp page , it is giving me error as :-

        java.sql.SQLException: No suitable driver

Could you please point me in the right direction as where it is expecting thoose drivers.

 -------My Jsp code is-----

<%@ page import="java.sql.*" %>
<%@ page session="true" %>
<%@ page language="java" import="pkgclass.*" %>
<jsp:useBean id="PV1" scope="page" class="pkgclass.UserLogin"/>



<%-- Statements to stop caching at client site --%>
<%
        response.setHeader("Cache-Control","no-store"); //HTTP 1.1
        response.setHeader("Pragma","no-cache"); //HTTP 1.0
        response.setDateHeader ("Expires", 0); //prevents caching at the proxy
%>

<% PV1.setSID("SDGT");
        PV1.setHost("dpwdev02") ;
        PV1.setSID("drpd");
        PV1.setUID("crdbweb") ;
        PV1.setPWD("crdbweb");
        String sres = PV1.amplogin();
        out.println("Msgback : "+sres);

%>


<html>
<Head><Title>Boots First page</title></head>

<html>
<body bgcolor="#EBE4DF">
<Table>
    <TH>Broadband Online Order Tracking system </TH>

</Table>

</body>
</html>
--------------------------------------------------------
I'm attaching my class code with this mail but I think the problem is that Tomcat can't recognize the drivers


Thanks in advance for your reply..


Regards,

Divya



-----Original Message-----
From: jakarta [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2003 15:04
To: 'Tomcat Users List'
Subject: RE: Tomcat error while using a class with JSP!


I believe that you have to package your class ie boots.PVDatabase
 
as I recall unpackaged classes are not valid
 
John

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 09, 2003 9:42 AM
To: [EMAIL PROTECTED]
Subject: Tomcat error while using a class with JSP!




Hi All,

       I am new to Tomcat so I would really appreciate if somebody could
help me in this.

I have Tomcat 4.1.29 installed on my windows 2000 machine. At the  same
level as examples is in Tomcat path, I've created a directory called
boots(this is my application directory.) and have a index.jsp under
boots and a class called PVDatabase.class under C:\Program Files\Apache
Group\Tomcat 4.1\webapps\boots\WEB-INF\classes directory where
C:\Program Files\Apache Group\Tomcat 4.1 is my CATALINA_HOME variable.

   I have modified server.xml to include the context boots there.  When
I try to call this class from my index.jsp it gives me the following
error.


org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 2 in the jsp file: /index.jsp

Generated servlet error:
    [javac] Compiling 1 source file

C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\boots\index_jsp.java:44: cannot resolve
symbol
symbol  : class PVDatabase
location: class org.apache.jsp.index_jsp
      PVDatabase PV1 = null;
      ^



An error occurred at line: 2 in the jsp file: /index.jsp

Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\boots\index_jsp.java:46: cannot resolve
symbol
symbol  : class PVDatabase
location: class org.apache.jsp.index_jsp
        PV1 = (PVDatabase) pageContext.getAttribute("PV1",
PageContext.PAGE_SCOPE);
               ^



An error occurred at line: 2 in the jsp file: /index.jsp

Generated servlet error:
C:\Program Files\Apache Group\Tomcat
4.1\work\Standalone\localhost\boots\index_jsp.java:49: cannot resolve
symbol
symbol  : class PVDatabase
location: class org.apache.jsp.index_jsp
            PV1 = (PVDatabase)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"PVDatabase");
                   ^
3 errors


        at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:130)
        at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:293)
        at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
        at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
        at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:473)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:190)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
        at java.lang.Thread.run(Thread.java:536)




   I am not really sure as what am I missing here in configuration. I'm
sending my server.xml and index.jsp with this mail..

Looking forward to hear from you very soon.

Thanks & Regards,


Divya
<<server.xml>> <<index.jsp>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to