tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greer, Darren (MED)" <Darren.Gr...@med.ge.com>
Subject load-on-startup in web.xml (was RE: JSP imports and CLASSPATH iss ues)
Date Wed, 13 Feb 2002 16:47:29 GMT
Thanks Greg, worked like a charm!

Now for the next question regarding load-on-startup in my web.xml.

Other than having an "public void init" method in my servlet, and a
servlet definition on the web.xml with load-on-startup, is there
anything else that needs to be done?

The application is deploying fine, but is not running the init function
(I am doing a System.out.println("Servlet Started") to test).

Any thoughts would be appreciated,

Darren

-----Original Message-----
From: Greg Trasuk [mailto:stratuscom@on.aibn.com] 
Sent: Tuesday, February 12, 2002 10:52 AM
To: 'Tomcat Users List'
Subject: RE: JSP imports and CLASSPATH issues


Hi Darren:

	WEB-INF/lib is where you would put your '.jar' files.
Un'jarred' classes should go in WEB-INF/classes with the usual package
heirarchy under WEB-INF/classes.  So your class file should be
WEB-INF/classes/com/javaexchange/dbConnectionBroker/dbConectionBroker.cl
ass

Cheers,

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use information technology to
solve business problems on your plant floor. http://stratuscom.ca

> -----Original Message-----
> From: Greer, Darren (MED) [mailto:Darren.Greer@med.ge.com]
> Sent: February 12, 2002 10:58
> To: 'tomcat-user@jakarta.apache.org'
> Subject: JSP imports and CLASSPATH issues
>
>
> Hello all.
>
> I am running Tomcat v4.0.1 with jdk1.3.1 on a Linux box.  I have 
> created a basic webapp that utilizes a single servlet which uses a
> dbConnectionBroker class.
>
> I have a JSP which is creating a new dbConnection and I need to import

> the dbConnectionBroker class.  This class file is located in 
> WEB-INF/lib/com/javaexchange/dbConnectionBroker/dbConectionBro
> ker.class.
>
> I am doing a:
>   <%@ page import="com.javaexchange.dbConnectionBroker.*" %>
>
> I get the following error:
>
> ###########
> org.apache.jasper.JasperException: Unable to compile class for JSP 
> /opt/java/jakarta/jakarta-tomcat-4.0.1/dist/work/localhost/nod
> /index$jsp
> .java:3: Package com.javaexchange.dbConnectionBroker not found in 
> import. import com.javaexchange.dbConnectionBroker.*;
>        ^
> 1 error
> ###########
>
> Is the WEB-INF/lib directory not in the CLASSPATH at runtime?  Or am I

> doing something wrong?
>
> Thanks,
>
> Darren
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message