You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thierry Cools <th...@s1.com> on 2001/02/05 14:45:22 UTC

Tomcat problem

Hi, 
well this not really a struts problem, but as there are a lot of Tomcat specialists in this mailing list ( at least one ;-) ), I'm sure I'll get an answer.
So my problem is :

I currently busy to evaluate the use of different application servers and web servers, e.g I tried to communicate between Tomcat and Weblogic app server or Tomcat and ATG( another app server), I both case it works, but the problem is that in both case I have to manually add the jar file containing the client classes ( home, stubs, ...).
in my classpath, however the jar file is under the web-inf/lib directory.

So the question is, I tought that Tomcat automatically adds all jar files under the web-inf/lib directory, and if it is the case why do I have to add them in the classpath to avoid class not found exceptions. 

Thanks for your help,
Thierry

P.S. I'm using Tomcat 3.2.1


Thierry Cools
 
Senior Java Developer 
S1 Brussels 
Kleine Kloosterstraat, 23 
1932 st. Stevens-Woluwe 
Belgium 
Tel : +32 2 200 43 82 
Email : thierry.cools@s1.com 


Re: Tomcat problem

Posted by Thierry Cools <th...@s1.com>.
Hi Craig,
yes you're the Tomcat specialist I was looking for ;-)

To answer you're question, yes, Struts is working fine under the environement I use, and what you told me is very strange, because I put the struts library in the classpath just before starting Tomcat and put my jar file containing my classes in the root lib of Tomcat and it works ( the reason I do that is that otherwise I receive a class not found exception when Tomcat deploys my war file).

But ok, that not really the problem, I thing that the problem is more to make Tomcat work with Application Servers, Does someone know what are the exact system properties (Java -D....) to make Tomcat works with Weblogic for example 

I already use the -Djava.naming.factory.initial="weblogic.jndi.WLInitialContextFactory" and -Djava.naming.provider.url="t3://localhost:7001" properties, but those seems not to be enough to make it works. and the only way, for now, is to put my jar file in the classpath.

Thanks for your help,
Thierry

Thierry Cools
 
Senior Java Developer 
S1 Brussels 
Kleine Kloosterstraat, 23 
1932 st. Stevens-Woluwe 
Belgium 
Tel : +32 2 200 43 82 
Email : thierry.cools@s1.com 

  ----- Original Message ----- 
  From: Craig R. McClanahan 
  To: struts-user@jakarta.apache.org 
  Sent: Monday, February 05, 2001 8:56 PM
  Subject: Re: Tomcat problem


  Thierry Cools wrote: 
    Hi,well this not really a struts problem, but as there are a lot of Tomcat specialists in this mailing list ( at least one ;-) ), I'm sure I'll get an answer.  
    So my problem is : I currently busy to evaluate the use of different application servers and web servers, e.g I tried to communicate between Tomcat and Weblogic app server or Tomcat and ATG( another app server), I both case it works, but the problem is that in both case I have to manually add the jar file containing the client classes ( home, stubs, ...).in my classpath, however the jar file is under the web-inf/lib directory. So the question is, I tought that Tomcat automatically adds all jar files under the web-inf/lib directory, and if it is the case why do I have to add them in the classpath to avoid class not found exceptions. Thanks for your help,Thierry P.S. I'm using Tomcat 3.2.1   
    Thierry Cools 
    Senior Java Developer 
    S1 Brussels 
    Kleine Kloosterstraat, 23 
    1932 st. Stevens-Woluwe 
    Belgium 
    Tel : +32 2 200 43 82 
    Email : thierry.cools@s1.com


  I wonder who that Tomcat specialist might be?  :-) 

  Tomcat 3.2.1 does indeed put JAR files under /WEB-INF/lib into the class path visible to a web application's class loader.  In fact, for Struts to work correctly under Tomcat, the classes *must not* be visible on the system classpath, or installed as a system extension in $JAVA_HOME/jre/lib/ext. 

  Were you able to get the Struts example application to work "out of the box"? 

  Craig 
    


Re: Tomcat problem

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Thierry Cools wrote:

> Hi,well this not really a struts problem, but as there are a lot of
> Tomcat specialists in this mailing list ( at least one ;-) ), I'm sure
> I'll get an answer.
> So my problem is : I currently busy to evaluate the use of different
> application servers and web servers, e.g I tried to communicate
> between Tomcat and Weblogic app server or Tomcat and ATG( another app
> server), I both case it works, but the problem is that in both case I
> have to manually add the jar file containing the client classes (
> home, stubs, ...).in my classpath, however the jar file is under the
> web-inf/lib directory. So the question is, I tought that Tomcat
> automatically adds all jar files under the web-inf/lib directory, and
> if it is the case why do I have to add them in the classpath to avoid
> class not found exceptions. Thanks for your help,Thierry P.S. I'm
> using Tomcat 3.2.1
> Thierry Cools
>
> Senior Java Developer
> S1 Brussels
> Kleine Kloosterstraat, 23
> 1932 st. Stevens-Woluwe
> Belgium
> Tel : +32 2 200 43 82
> Email : thierry.cools@s1.com

I wonder who that Tomcat specialist might be?  :-)

Tomcat 3.2.1 does indeed put JAR files under /WEB-INF/lib into the class
path visible to a web application's class loader.  In fact, for Struts
to work correctly under Tomcat, the classes *must not* be visible on the
system classpath, or installed as a system extension in
$JAVA_HOME/jre/lib/ext.

Were you able to get the Struts example application to work "out of the
box"?

Craig