thanks Dimitri
but that is what i exactly did, and (of course) i imported oreily package
at the beginning with ( import com.oreilly.servlet.*; )
but all those efforts are in vain, i don't understand it.
when i reference this ParameterParser file with fulll path it works
like:
com.oreilly.servlet.ParameterParser parser=new
com.oreilly.servlet.ParameterParser ;
this works,
but why don't the others work.
i put this packet under both <tomcat_home>/lib/cos.jar,
<tomcathome>webapps/root/web-inf/classes/com/oreilly/servlet/ and as well as
<tomcathome>webapps/root/web-inf/lib/ but still Doesn't work, simply i can't
compile
becasue it keeps telling me  ParameterParser is not on the classpath
any ideas please ( i used tomcat 4 and tomcat 3.2.2 ) they both behave the
same way
thanks for your help
----- Original Message -----
From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 12:33 PM
Subject: Re: a simple ( irritating) classpath problem


> hi,
>
> There are three basic areas that classes can be put in tomcat:
>
> WEB-INF/classes
>   - contains all the classes that form the web application
> WEB-INF/lib
>   - contains jars that the web application uses
> TOMCAT_HOME/lib
>   - contains jars that are available to _all_ applications using tomcat
>
> > because i put all the package (com.oreilly.servlet.*) in the same
directory
> > with the servlet (under web-inf/classes/ com/servlet/  directory)
>
> if it is the package com.oreilly.servlet then it should go in
> WEB-INF/classes/com/oreilly/servlet - even better, I assume you got it as
> a jar, just put the jar in WEB-INF/lib .  If it is a zip, then rename it
> to a jar.
>
> > i tried putting the cos.jar file in the web-inf/lib directory, it didn't
> > work
>
> what do you mean it didn't work?  try jar -tf cos.jar to check that the
> classes are in the jar.  I assume you are importing the required classes
> and that they exist in the jar.
>
> > in put these files directly under the web-inf/classes/   directory , it
> > didn't work either
>
> again, should be according to package
>
> > then i added the full path <tomcat_home>/lib/cos.jar, to the classpath,
> > didn't work either.
>
> I'm not sure why that didn't work - although if you put cos.jar in the
> classpath it _should_ be available to all web applications.
>
> > well, i gave up, i just wanted to learn the LOGICAL way to set the
classpath
> > up.
>
> you dont need to set the classpath yourself.  just put your jars in
> WEB-INF/lib and your classes in WEB-INF/classes
>
> hth, cheers
> dim
>
>


Reply via email to