>From: Pier Fumagalli <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: Tomcat 4 RC 2 doubts
>Date: Sun, 16 Sep 2001 14:25:41 +0100
>
>"Jiger Java" <[EMAIL PROTECTED]> wrote:
>
> > 1. Since Tomcat 4 uses its own Classloaders it does not recognise the 
>JDK
> > CLASSPATH variable.Now what do I do if I want a set of libraries which I
> > have installed in JDK(set in CLASSPATH variable) & also to be used by
> > tomcat. Putting things in two places wold be cumbersome.Dont youall feel 
>so.
>
>Nope, I don't... If in Java2 you are using a "classpath", you are, IMHO,
>wrong... Libraries required by the JDK, if shared by multiple stuff should
>be in JAVA_HOME/jre/lib/ext...

  I know that Java2 onwards CLASSPATH var. has been depre. & prefered way is 
to put jars in lib/ext dir of JDK installation. But many times the System 
Classloader does not load it properly.I dont know why but thats true. It is 
better to rely on tried & tested CLASSPATH thingi then on experimental 
lib/ext one.

>
> > 2. If I try to add CLASSPATH in the catalina.bat file along with its
> > CLASSPATH then TOmcat starts giving out strange errors. For e.g In my 
>app I
> > was using Custom Tags & appending the classpath in catalina gave me
> > NoClassDefFound for TagSupport class of JSP when the Sample Custom Tag
> > example worked normally. How do I integrate JDK classpath with Tomcat
> > CLASSPATH without any hitches.
>
>I don't think you can... The layerization of the class loaders was made
>exactly to prevent that... Either put your CLASSPATH jars in the JDK
>classpath (JAVA_HOME/jre/lib/ext), or in the Catalina extension
>(CATALINA_HOME/lib).
>
> > 3. I am believing that Tomcat no longer allows extraced classes in the 
>lib
> > dir. only .jars are allowed & all non-jars libraries should be kept in
> > classes dir. but this is very non-intutive coz it confuses us with 
>servlets
> > & libraries. Should the pre-Tomcat 4 standard of keeping non-jars in lib 
>&
> > then brought into CLASSPATH in tomcat.bat/catalina.bat work. Any 
>specific
> > reasons.
>
>It is documented. Relying on CLASSPATH after JDK 1.2 came out is WRONG.
>Tomcat 3.x does it because it maintains compatibility with JDK 1.1, but
>since in JDK 1.2 the wonderful world of classloaders got a nicer and more
>secure, relying still on the deprecated CLASSPATH variable would be stupid.
>
> > THere are many more doubts guys but please enlighten me with these 
>atleast.
>
>I hope they're not an environment variables :)
Dont worry they wont be abt them. Unless Tomcat creates some prob. inspite 
of not using them.!! :)
>
>     Pier
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to