RE: Classpath problem with TC 3.2.3
With ODBCConnection in the dbcall package, you should be able to use %@ page ... import=dbcall.ODBCConnection ... %, or dbcall.ODBCConnection as a fully qualified class name where needed. I assume the ODBCConnection class file is in the WEB-INF/classes/dbcall directory, or is it in a jar? If it isn't working, what error are you seeing? Larry -Original Message- From: Voon, Wendy [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 7:37 PM To: 'Tomcat Users List' Subject: RE: Classpath problem with TC 3.2.3 Larry, Thanks for the tip, I got it to work by putting the ODBCConnection class in the package jsp.dbcall, whilst the jsp page resides in jsp/dbcall. But now I am very confused, according to what you have said in your email: If I place the ODBConnection class in package dbcall and my jsp page resides in jsp/dbcall I should be able to reference ODBCConnection as dbcall.ODBCConnection. But I couldn't. Could it be the fact that I am importing the class like so: import=dbcall.ODBCConnection as opposed to using a bean: jsp:useBean id=table scope=session class=cal.TableBean / Confused, Wendy -Original Message- From: Larry Isaacs [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, 31 October 2001 23:51 To: 'Tomcat Users List' Subject:RE: Classpath problem with TC 3.2.3 It looks like the JSP you are executing is in a jsp subdirectory of the web application. If you check the Java source for the JSP under the work directory you will find that the servlet class for this JSP is in the jsp package. This means that classes specified without package names will be expected to be found in the jsp package. Since ODBCConnection isn't in the jsp package it isn't found. If this JSP page is moved to the root of the web application you wouldn't see this error since the servlet class for the jsp wouldn't be in a package. However, this isn't the correct solution for this problem. The correct solution is to *always* put classes, like ODBCConnection, in a package so the package the JSP servlet gets put in won't matter. Hopefully this is what is causing your problem. Cheers, Larry -Original Message- From: Voon, Wendy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 5:29 PM To: '[EMAIL PROTECTED]' Subject: Classpath problem with TC 3.2.3 Hi, I have installed TC 3.2.3. When I try to execute a .jsp I get the following message: org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_000 2fjsp_0002ftes t_0002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); C:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fj sp_0002ftest_0 002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); I tried placing the .class file concerned in both : jakarta-tomcat-3.2.3\classes directory jakarta-tomcat-3.2.3\webapps\examples\web-info\classes with no luck. Wendy Voon Wendy Voon Consultant Black Diamond T e c h n o l o g i e s Level 1, 6 Riverside Quay, Southbank, Victoria, 3006. E-mail: [EMAIL PROTECTED] Telephone: (03) 9698 - 7600 Facsimile: (03) 9698 - 7666 Web: http://www.bdt.com.au/ ---INTERNET E-MAIL CONFIDENTIALITY/DISCLAIMER Privileged and confidential information may be contained in this e-mail. If you are not the intended recipient of this communication please delete and destroy all copies and kindly notify the sender by return e-mail. Recipients of this e-mail must not use, disclose or forward any information or attachments without express permission from Black Diamond Technologies. Any views expressed in this communication are those of the individual sender except where the sender specifically states them to be the views of Black Diamond Technologies. Except as required at law, we do not represent warrant and/or guarantee that the integrity of this communication has been maintained or that it is free of errors, viruses, interception or interference. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Classpath problem with TC 3.2.3
Larry, Thanks for the tip, I got it to work by putting the ODBCConnection class in the package jsp.dbcall, whilst the jsp page resides in jsp/dbcall. But now I am very confused, according to what you have said in your email: If I place the ODBConnection class in package dbcall and my jsp page resides in jsp/dbcall I should be able to reference ODBCConnection as dbcall.ODBCConnection. But I couldn't. Could it be the fact that I am importing the class like so: import=dbcall.ODBCConnection as opposed to using a bean: jsp:useBean id=table scope=session class=cal.TableBean / Confused, Wendy -Original Message- From: Larry Isaacs [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, 31 October 2001 23:51 To: 'Tomcat Users List' Subject: RE: Classpath problem with TC 3.2.3 It looks like the JSP you are executing is in a jsp subdirectory of the web application. If you check the Java source for the JSP under the work directory you will find that the servlet class for this JSP is in the jsp package. This means that classes specified without package names will be expected to be found in the jsp package. Since ODBCConnection isn't in the jsp package it isn't found. If this JSP page is moved to the root of the web application you wouldn't see this error since the servlet class for the jsp wouldn't be in a package. However, this isn't the correct solution for this problem. The correct solution is to *always* put classes, like ODBCConnection, in a package so the package the JSP servlet gets put in won't matter. Hopefully this is what is causing your problem. Cheers, Larry -Original Message- From: Voon, Wendy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 5:29 PM To: '[EMAIL PROTECTED]' Subject: Classpath problem with TC 3.2.3 Hi, I have installed TC 3.2.3. When I try to execute a .jsp I get the following message: org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_000 2fjsp_0002ftes t_0002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); C:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fj sp_0002ftest_0 002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); I tried placing the .class file concerned in both : jakarta-tomcat-3.2.3\classes directory jakarta-tomcat-3.2.3\webapps\examples\web-info\classes with no luck. Wendy Voon Wendy Voon Consultant Black Diamond T e c h n o l o g i e s Level 1, 6 Riverside Quay, Southbank, Victoria, 3006. E-mail: [EMAIL PROTECTED] Telephone: (03) 9698 - 7600 Facsimile: (03) 9698 - 7666 Web: http://www.bdt.com.au/ ---INTERNET E-MAIL CONFIDENTIALITY/DISCLAIMER Privileged and confidential information may be contained in this e-mail. If you are not the intended recipient of this communication please delete and destroy all copies and kindly notify the sender by return e-mail. Recipients of this e-mail must not use, disclose or forward any information or attachments without express permission from Black Diamond Technologies. Any views expressed in this communication are those of the individual sender except where the sender specifically states them to be the views of Black Diamond Technologies. Except as required at law, we do not represent warrant and/or guarantee that the integrity of this communication has been maintained or that it is free of errors, viruses, interception or interference. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Classpath problem with TC 3.2.3
It looks like the JSP you are executing is in a jsp subdirectory of the web application. If you check the Java source for the JSP under the work directory you will find that the servlet class for this JSP is in the jsp package. This means that classes specified without package names will be expected to be found in the jsp package. Since ODBCConnection isn't in the jsp package it isn't found. If this JSP page is moved to the root of the web application you wouldn't see this error since the servlet class for the jsp wouldn't be in a package. However, this isn't the correct solution for this problem. The correct solution is to *always* put classes, like ODBCConnection, in a package so the package the JSP servlet gets put in won't matter. Hopefully this is what is causing your problem. Cheers, Larry -Original Message- From: Voon, Wendy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 5:29 PM To: '[EMAIL PROTECTED]' Subject: Classpath problem with TC 3.2.3 Hi, I have installed TC 3.2.3. When I try to execute a .jsp I get the following message: org.apache.jasper.JasperException: Unable to compile class for JSPC:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_000 2fjsp_0002ftes t_0002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); C:\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fj sp_0002ftest_0 002ejsptest_jsp_0.java:65: Class jsp.ODBCConnection not found. ODBCConnection p = new ODBCConnection(); I tried placing the .class file concerned in both : jakarta-tomcat-3.2.3\classes directory jakarta-tomcat-3.2.3\webapps\examples\web-info\classes with no luck. Wendy Voon Wendy Voon Consultant Black Diamond T e c h n o l o g i e s Level 1, 6 Riverside Quay, Southbank, Victoria, 3006. E-mail: [EMAIL PROTECTED] Telephone: (03) 9698 - 7600 Facsimile: (03) 9698 - 7666 Web: http://www.bdt.com.au/ ---INTERNET E-MAIL CONFIDENTIALITY/DISCLAIMER Privileged and confidential information may be contained in this e-mail. If you are not the intended recipient of this communication please delete and destroy all copies and kindly notify the sender by return e-mail. Recipients of this e-mail must not use, disclose or forward any information or attachments without express permission from Black Diamond Technologies. Any views expressed in this communication are those of the individual sender except where the sender specifically states them to be the views of Black Diamond Technologies. Except as required at law, we do not represent warrant and/or guarantee that the integrity of this communication has been maintained or that it is free of errors, viruses, interception or interference. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]