RE: newbie - finding class files

2003-08-27 Thread Stuart MacPherson
What's wrong with putting them in CATALINA_HOME/common/lib?


-Original Message-
From: P.van Kemenade [mailto:[EMAIL PROTECTED] 
Sent: 26 August 2003 16:49
To: Tomcat List
Subject: RE: newbie - finding class files

Hi

I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.

this url

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.

but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.

should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?

  that should work, but it sounds ugly.




 On Tue, 16 Jul 2002, Andreas Probst wrote:

  Date: Tue, 16 Jul 2002 13:59:49 +0200
  From: Andreas Probst [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: newbie - finding class files
 
 
   On Mon, 15 Jul 2002, Andreas Probst wrote:
  
   
Hi all,
   
does Tomcat really look into tomcatdir/server/lib? For me it 
 seems
Tomcat doesn't.
   
  
   This directory is only visible to the classloader for Tomcat 
 itself, not
   for webapps.  There is a special rule that makes servlet classes in
   package org.apache.catalina available to webapps anyway, 
 however, which
   is why the standard WebdavServlet (as well as the other Tomcat 
 features
   that are available via servlets) can be loaded.
  
   Craig
 
  Thank you Craig.
 
  Could you please tell more about the rule or give a pointer. The
  class-loader-info of the Tomcat-Docu says nothing about the rule, but
  says, that These classes and resources are TOTALLY invisible to web
  applications.
 

 Actually, the rule is very simple, and it is there in the docs.  Look 
 at
 the picture of the class loader hierarchy in the Tomcat docs:

   http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
 howto.html

 The classes that are visible to a web application are those in the 
 class
 loader for that webapp, and any of it's parent class loaders.  In other
 words, an application can see the WebappX class loader for itself, 
 plus
 the Shared, Common, System, and Bootstrap class loaders.  It 
 can
 *not* see the Catalina class loader.


thanks,
*-pike
---
Editorship Styling 'Techniek is waistline, Publish the plan!'
What make the method strong until for instance one newspaperman who
wish publish and not with technique wish turn troublesome fallen?
The
clientèle with all the bye bye the handshake with examples decrepit.

The
motto: 'Techniek is waistline, publish the plan!'

http://www.worldlanguage.com/Translation.htm 

==
The key words MUST, MUST NOT, REQUIRED, SHALL,
SHALL NOT  SHOULD, SHOULD NOT, RECOMMENDED,
MAY, and OPTIONAL in this document  are to be interpreted
as described in [RFC2119]



I wasted time, and now doth time waste me.
Or now hath time made me his numb’ring clock:
My thoughts are minutes; and, with sighs, they jar
Their watches on to mine eyes, the outward watch,
Whereto my finger, like a dial’s point,
Is pointing still, in cleansing them from tears.

http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie - finding class files

2003-08-27 Thread Pike
Hi

thanks for your response (sorry about the repeated post - my mistake)

What's wrong with putting them in CATALINA_HOME/common/lib?
well, nothing. it just sounds very ugly, having the same jar files
running twice in one tomcat, once in server/lib and once in common/lib.
is this how its _normally_ done ?
another point is, tomcat starts complaining about 'bundles' then,
but this may be solvable...
I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
  that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

Date: Tue, 16 Jul 2002 13:59:49 +0200
From: Andreas Probst [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: newbie - finding class files

On Mon, 15 Jul 2002, Andreas Probst wrote:

Hi all,

does Tomcat really look into tomcatdir/server/lib? For me it  seems
Tomcat doesn't.
This directory is only visible to the classloader for Tomcat  
itself, not
for webapps.  There is a special rule that makes servlet classes in
package org.apache.catalina available to webapps anyway, however,  
which
is why the standard WebdavServlet (as well as the other Tomcat  
features
that are available via servlets) can be loaded.

Craig
Thank you Craig.

Could you please tell more about the rule or give a pointer. The
class-loader-info of the Tomcat-Docu says nothing about the rule, but
says, that These classes and resources are TOTALLY invisible to web
applications.
Actually, the rule is very simple, and it is there in the docs.  Look  
at
the picture of the class loader hierarchy in the Tomcat docs:

   
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
howto.html

The classes that are visible to a web application are those in the  
class
loader for that webapp, and any of it's parent class loaders.  In  
other
words, an application can see the WebappX class loader for itself,
plus the Shared, Common, System, and Bootstrap class loaders.  
 It
can*not* see the Catalina class loader.


thanks,
*-pike
==
Signature #1
==
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: newbie - finding class files

2003-08-27 Thread Stuart MacPherson
Well actually if you have them in 2 places it can cause terminal errors, and
at the very least will waste time and memory on startup.  Common/lib is not
an ideal solution, but you might want to try it at least to see if it works.
In any case, if you install things like Slide (a Jakarta DMS/CMS
webDAV-based framework), all the webDAV Servlets (and indeed everything
else) goes in common/lib.  Alternatively, have you try putting it inside the
/lib directory of your webapp?  It will then only be accessible to that
webapp tho.


-Original Message-
From: Pike [mailto:[EMAIL PROTECTED] 
Sent: 27 August 2003 00:25
To: Tomcat Users List
Subject: Re: newbie - finding class files

Hi

thanks for your response (sorry about the repeated post - my mistake)

 What's wrong with putting them in CATALINA_HOME/common/lib?

well, nothing. it just sounds very ugly, having the same jar files
running twice in one tomcat, once in server/lib and once in common/lib.
is this how its _normally_ done ?

another point is, tomcat starts complaining about 'bundles' then,
but this may be solvable...

 I found this old thread about extending WebdavServlet,
 in which Andreas Probst notes his webapp cant load classes
 from the $CATALINA_HOME/servlet/lib/ dir.

 this url
   
 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
 makes it clear why.

 but now: how should I  extend WebdavServlet inside my webapp ?
 If i put my own classes in the org.apache.bla package, it can't load
 the classes from my webapp, ofcourse.

 should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
 to my webapps /WEB-INF/lib ?

   that should work, but it sounds ugly.




 On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


 On Mon, 15 Jul 2002, Andreas Probst wrote:


 Hi all,

 does Tomcat really look into tomcatdir/server/lib? For me it  seems
 Tomcat doesn't.


 This directory is only visible to the classloader for Tomcat  
 itself, not
 for webapps.  There is a special rule that makes servlet classes in
 package org.apache.catalina available to webapps anyway, however,  
 which
 is why the standard WebdavServlet (as well as the other Tomcat  
 features
 that are available via servlets) can be loaded.

 Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


 Actually, the rule is very simple, and it is there in the docs.  Look  
 at
 the picture of the class loader hierarchy in the Tomcat docs:


 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
 howto.html

 The classes that are visible to a web application are those in the  
 class
 loader for that webapp, and any of it's parent class loaders.  In  
 other
 words, an application can see the WebappX class loader for itself,
 plus the Shared, Common, System, and Bootstrap class loaders.  
  It
 can*not* see the Catalina class loader.



thanks,
*-pike
==
Signature #1
==


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie - finding class files

2003-08-26 Thread P . van Kemenade


Hi

I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
 that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


  On Mon, 15 Jul 2002, Andreas Probst wrote:
 
  
   Hi all,
  
   does Tomcat really look into tomcatdir/server/lib? For me it 
seems
   Tomcat doesn't.
  
 
  This directory is only visible to the classloader for Tomcat 
itself, not
  for webapps.  There is a special rule that makes servlet classes in
  package org.apache.catalina available to webapps anyway, 
however, which
  is why the standard WebdavServlet (as well as the other Tomcat 
features
  that are available via servlets) can be loaded.
 
  Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


Actually, the rule is very simple, and it is there in the docs.  Look 
at
the picture of the class loader hierarchy in the Tomcat docs:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
howto.html

The classes that are visible to a web application are those in the 
class
loader for that webapp, and any of it's parent class loaders.  In other
words, an application can see the WebappX class loader for itself, 
plus
the Shared, Common, System, and Bootstrap class loaders.  It 
can
*not* see the Catalina class loader.


thanks,
*-pike

I wasted time, and now doth time waste me.
Or now hath time made me his numbring clock:
My thoughts are minutes; and, with sighs, they jar
Their watches on to mine eyes, the outward watch,
Whereto my finger, like a dials point,
Is pointing still, in cleansing them from tears.
http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: newbie - finding class files

2003-08-26 Thread P . van Kemenade
Hi

I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
 that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


  On Mon, 15 Jul 2002, Andreas Probst wrote:
 
  
   Hi all,
  
   does Tomcat really look into tomcatdir/server/lib? For me it  
seems
   Tomcat doesn't.
  
 
  This directory is only visible to the classloader for Tomcat  
itself, not
  for webapps.  There is a special rule that makes servlet classes in
  package org.apache.catalina available to webapps anyway,  
however, which
  is why the standard WebdavServlet (as well as the other Tomcat  
features
  that are available via servlets) can be loaded.
 
  Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


Actually, the rule is very simple, and it is there in the docs.  Look  
at
the picture of the class loader hierarchy in the Tomcat docs:

   
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- howto.html

The classes that are visible to a web application are those in the  
class
loader for that webapp, and any of it's parent class loaders.  In other
words, an application can see the WebappX class loader for itself,  
plus
the Shared, Common, System, and Bootstrap class loaders.  It  
can
*not* see the Catalina class loader.


thanks,
*-pike
---
Editorship Styling 'Techniek is waistline, Publish the plan!'
	What make the method strong until for instance one newspaperman who
	wish publish and not with technique wish turn troublesome fallen? The
	clientèle with all the bye bye the handshake with examples decrepit.  
The
	motto: 'Techniek is waistline, publish the plan!'

http://www.worldlanguage.com/Translation.htm 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: newbie - finding class files

2003-08-26 Thread P . van Kemenade
Hi

I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
 that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


  On Mon, 15 Jul 2002, Andreas Probst wrote:
 
  
   Hi all,
  
   does Tomcat really look into tomcatdir/server/lib? For me it 
seems
   Tomcat doesn't.
  
 
  This directory is only visible to the classloader for Tomcat 
itself, not
  for webapps.  There is a special rule that makes servlet classes in
  package org.apache.catalina available to webapps anyway, 
however, which
  is why the standard WebdavServlet (as well as the other Tomcat 
features
  that are available via servlets) can be loaded.
 
  Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


Actually, the rule is very simple, and it is there in the docs.  Look 
at
the picture of the class loader hierarchy in the Tomcat docs:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
howto.html

The classes that are visible to a web application are those in the 
class
loader for that webapp, and any of it's parent class loaders.  In other
words, an application can see the WebappX class loader for itself, 
plus
the Shared, Common, System, and Bootstrap class loaders.  It 
can
*not* see the Catalina class loader.


thanks,
*-pike
---
Editorship Styling 'Techniek is waistline, Publish the plan!'
	What make the method strong until for instance one newspaperman who
	wish publish and not with technique wish turn troublesome fallen? The
	clientle with all the bye bye the handshake with examples decrepit. 
The
	motto: 'Techniek is waistline, publish the plan!'

http://www.worldlanguage.com/Translation.htm?

==
The key words MUST, MUST NOT, REQUIRED, SHALL,
SHALL NOT  SHOULD, SHOULD NOT, RECOMMENDED,
MAY, and OPTIONAL in this document  are to be interpreted
as described in [RFC2119]

I wasted time, and now doth time waste me.
Or now hath time made me his numbring clock:
My thoughts are minutes; and, with sighs, they jar
Their watches on to mine eyes, the outward watch,
Whereto my finger, like a dials point,
Is pointing still, in cleansing them from tears.
http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: newbie - finding class files

2003-08-26 Thread P . van Kemenade
Hi

I found this old thread about extending WebdavServlet,
in which Andreas Probst notes his webapp cant load classes
from the $CATALINA_HOME/servlet/lib/ dir.
this url
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
makes it clear why.
but now: how should I  extend WebdavServlet inside my webapp ?
If i put my own classes in the org.apache.bla package, it can't load
the classes from my webapp, ofcourse.
should I copy all jar files from  $CATALINA_HOME/servlet/lib/*jar
to my webapps /WEB-INF/lib ?
 that should work, but it sounds ugly.



On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


  On Mon, 15 Jul 2002, Andreas Probst wrote:
 
  
   Hi all,
  
   does Tomcat really look into tomcatdir/server/lib? For me it 
seems
   Tomcat doesn't.
  
 
  This directory is only visible to the classloader for Tomcat 
itself, not
  for webapps.  There is a special rule that makes servlet classes in
  package org.apache.catalina available to webapps anyway, 
however, which
  is why the standard WebdavServlet (as well as the other Tomcat 
features
  that are available via servlets) can be loaded.
 
  Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


Actually, the rule is very simple, and it is there in the docs.  Look 
at
the picture of the class loader hierarchy in the Tomcat docs:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader- 
howto.html

The classes that are visible to a web application are those in the 
class
loader for that webapp, and any of it's parent class loaders.  In other
words, an application can see the WebappX class loader for itself, 
plus
the Shared, Common, System, and Bootstrap class loaders.  It 
can
*not* see the Catalina class loader.


thanks,
*-pike
---
Editorship Styling 'Techniek is waistline, Publish the plan!'
	What make the method strong until for instance one newspaperman who
	wish publish and not with technique wish turn troublesome fallen? The
	clientèle with all the bye bye the handshake with examples decrepit. 
The
	motto: 'Techniek is waistline, publish the plan!'

http://www.worldlanguage.com/Translation.htm 

==
The key words MUST, MUST NOT, REQUIRED, SHALL,
SHALL NOT  SHOULD, SHOULD NOT, RECOMMENDED,
MAY, and OPTIONAL in this document  are to be interpreted
as described in [RFC2119]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: newbie - finding class files

2002-07-16 Thread Andreas Probst


 On Mon, 15 Jul 2002, Andreas Probst wrote:
 
 
  Hi all,
 
  does Tomcat really look into tomcatdir/server/lib? For me it seems
  Tomcat doesn't.
 
 
 This directory is only visible to the classloader for Tomcat itself, not
 for webapps.  There is a special rule that makes servlet classes in
 package org.apache.catalina available to webapps anyway, however, which
 is why the standard WebdavServlet (as well as the other Tomcat features
 that are available via servlets) can be loaded.
 
 Craig

Thank you Craig.

Could you please tell more about the rule or give a pointer. The class-loader-info of 
the Tomcat-Docu says nothing about the rule, but says, that These classes and 
resources are TOTALLY invisible to web applications.

Bye.

Andreas

 
 
  On the one hand the original webapp /webdav runs without errors. On
  the other hand, when I deploy a class that extends the original
  webdav-class org.apache.catalina.servlets.WebdavServlet (located in
  catalinahome\server\lib\servlets-webdav.jar) I get an
  java.lang.NoClassDefFoundError:
  org/apache/catalina/servlets/WebdavServlet.
 
  When I then copy catalinahome\server\lib\servlets-webdav.jar into
  catalinahome\webapps\mywebdav\WEB-INF\lib I get a different
  java.lang.NoClassDefFoundError:
  org/apache/catalina/servlets/DefaultServlet. DefaultServlet is
  located in catalinahome\server\lib\servlets-default.jar. So it seems
  Tomcat doesn't look into the catalinahome\server\lib\ directory. But
  why then runs the original /webdav app?
 
  What do I do wrong? Do I have to tell Tomcat somehow to look into the
  catalinahome\server\lib\ directory when running my webapp? Or do I
  have to copy all needed files from catalinahome\server\lib\ to my
  webapp's lib-directory? I suppose this shouldn't be the solution.
 
  By the way: I'm running Tomcat 4.0.4 on Windows 2000.
 
  Thanks a lot in advance.
 
  Andreas 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: newbie - finding class files

2002-07-16 Thread Craig R. McClanahan



On Tue, 16 Jul 2002, Andreas Probst wrote:

 Date: Tue, 16 Jul 2002 13:59:49 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files


  On Mon, 15 Jul 2002, Andreas Probst wrote:
 
  
   Hi all,
  
   does Tomcat really look into tomcatdir/server/lib? For me it seems
   Tomcat doesn't.
  
 
  This directory is only visible to the classloader for Tomcat itself, not
  for webapps.  There is a special rule that makes servlet classes in
  package org.apache.catalina available to webapps anyway, however, which
  is why the standard WebdavServlet (as well as the other Tomcat features
  that are available via servlets) can be loaded.
 
  Craig

 Thank you Craig.

 Could you please tell more about the rule or give a pointer. The
 class-loader-info of the Tomcat-Docu says nothing about the rule, but
 says, that These classes and resources are TOTALLY invisible to web
 applications.


Actually, the rule is very simple, and it is there in the docs.  Look at
the picture of the class loader hierarchy in the Tomcat docs:

  http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

The classes that are visible to a web application are those in the class
loader for that webapp, and any of it's parent class loaders.  In other
words, an application can see the WebappX class loader for itself, plus
the Shared, Common, System, and Bootstrap class loaders.  It can
*not* see the Catalina class loader.

Now, go down the page a few inches, and you'll see that the Catalina class
loader contains everything in server/classes and server/lib (including
servlets-webdav.jar that contains the WebDAV servlet).

 Bye.

 Andreas


Craig


 
 
   On the one hand the original webapp /webdav runs without errors. On
   the other hand, when I deploy a class that extends the original
   webdav-class org.apache.catalina.servlets.WebdavServlet (located in
   catalinahome\server\lib\servlets-webdav.jar) I get an
   java.lang.NoClassDefFoundError:
   org/apache/catalina/servlets/WebdavServlet.
  
   When I then copy catalinahome\server\lib\servlets-webdav.jar into
   catalinahome\webapps\mywebdav\WEB-INF\lib I get a different
   java.lang.NoClassDefFoundError:
   org/apache/catalina/servlets/DefaultServlet. DefaultServlet is
   located in catalinahome\server\lib\servlets-default.jar. So it seems
   Tomcat doesn't look into the catalinahome\server\lib\ directory. But
   why then runs the original /webdav app?
  
   What do I do wrong? Do I have to tell Tomcat somehow to look into the
   catalinahome\server\lib\ directory when running my webapp? Or do I
   have to copy all needed files from catalinahome\server\lib\ to my
   webapp's lib-directory? I suppose this shouldn't be the solution.
  
   By the way: I'm running Tomcat 4.0.4 on Windows 2000.
  
   Thanks a lot in advance.
  
   Andreas


 --
 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: newbie - finding class files

2002-07-15 Thread Andreas Probst

Hi all,

does Tomcat really look into tomcatdir/server/lib? For me it seems 
Tomcat doesn't. 

On the one hand the original webapp /webdav runs without errors. On 
the other hand, when I deploy a class that extends the original 
webdav-class org.apache.catalina.servlets.WebdavServlet (located in 
catalinahome\server\lib\servlets-webdav.jar) I get an 
java.lang.NoClassDefFoundError: 
org/apache/catalina/servlets/WebdavServlet.

When I then copy catalinahome\server\lib\servlets-webdav.jar into 
catalinahome\webapps\mywebdav\WEB-INF\lib I get a different 
java.lang.NoClassDefFoundError: 
org/apache/catalina/servlets/DefaultServlet. DefaultServlet is 
located in catalinahome\server\lib\servlets-default.jar. So it seems 
Tomcat doesn't look into the catalinahome\server\lib\ directory. But 
why then runs the original /webdav app?

What do I do wrong? Do I have to tell Tomcat somehow to look into the 
catalinahome\server\lib\ directory when running my webapp? Or do I 
have to copy all needed files from catalinahome\server\lib\ to my 
webapp's lib-directory? I suppose this shouldn't be the solution.

By the way: I'm running Tomcat 4.0.4 on Windows 2000.

Thanks a lot in advance.

Andreas Probst

 Brian,
 
 Tomcat looks for your classes under
 Tomcatdir/webapps/yourapp/WEB-INF/classes and Tomcatdir/common/classes and
 looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib ,
 Tomcatdir/common/lib (and Tomcatdir/server/lib but you shouldn't put your
 stuff in here)
 
 Andy
 
  -Original Message-
  From: Brian Wolf [mailto:[EMAIL PROTECTED]]
  Sent: 11 July 2002 22:12
  To: Tomcat Users List
  Subject: newbie - finding class files
 
 
  Hi
 
  I am having problems with  servlets finding class files. On Windows 98
  I have the classpath and path environmental variables set to
  c:\jdk1.4\bin
  and c:\jdk1.4 respectively. The Servlet works fine when converted to a
  command line application.
 
  -Brian
 
  ---
 
 
  Error: 500
  Location: /examples/servlet/processOptions
  Internal Servlet Error:
 
  java.lang.NoClassDefFoundError:
  com/sun/java/util/collections/AbstractSequentialList
   at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
   at org.jdom.input.SAXBuilder.build(SAXBuilder.java)
 
 
 
 
 
 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: newbie - finding class files

2002-07-15 Thread Andrew Conrad

Check this link for more info on class loading.  

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html

But it was my understanding that only Tomcat loads the classes and jars
located in the /server directory.

If you need access to it in your webapp, you have to either put the jar
in yourwebapp/WEB-INF/lib or in the shared library section.

For 4.0.4, shared libraries go in %CATALINA%\lib.  With 4.1.x, they go
in %CATALINA%\shared\lib.

- Andrew

 -Original Message-
 From: Andreas Probst [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, July 15, 2002 7:07 AM
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files
 
 
 Hi all,
 
 does Tomcat really look into tomcatdir/server/lib? For me it 
 seems Tomcat doesn't.
 
 On the one hand the original webapp /webdav runs without 
 errors. On the other hand, when I deploy a class that extends 
 the original webdav-class 
 org.apache.catalina.servlets.WebdavServlet (located in
 catalinahome\server\lib\servlets-webdav.jar) I get an
 java.lang.NoClassDefFoundError: 
 org/apache/catalina/servlets/WebdavServlet.
 
 When I then copy catalinahome\server\lib\servlets-webdav.jar 
 into catalinahome\webapps\mywebdav\WEB-INF\lib I get a different
 java.lang.NoClassDefFoundError: 
 org/apache/catalina/servlets/DefaultServlet. DefaultServlet 
 is located in catalinahome\server\lib\servlets-default.jar. 
 So it seems Tomcat doesn't look into the 
 catalinahome\server\lib\ directory. But why then runs the 
 original /webdav app?
 
 What do I do wrong? Do I have to tell Tomcat somehow to look 
 into the catalinahome\server\lib\ directory when running my 
 webapp? Or do I have to copy all needed files from 
 catalinahome\server\lib\ to my webapp's lib-directory? I 
 suppose this shouldn't be the solution.
 
 By the way: I'm running Tomcat 4.0.4 on Windows 2000.
 
 Thanks a lot in advance.
 
 Andreas Probst
 
  Brian,
 
  Tomcat looks for your classes under 
  Tomcatdir/webapps/yourapp/WEB-INF/classes and 
 Tomcatdir/common/classes 
  and looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib , 
  Tomcatdir/common/lib (and Tomcatdir/server/lib but you 
 shouldn't put 
  your stuff in here)
 
  Andy
 
   -Original Message-
   From: Brian Wolf [mailto:[EMAIL PROTECTED]]
   Sent: 11 July 2002 22:12
   To: Tomcat Users List
   Subject: newbie - finding class files
  
  
   Hi
  
   I am having problems with  servlets finding class files. 
 On Windows 
   98 I have the classpath and path environmental variables set to 
   c:\jdk1.4\bin and c:\jdk1.4 respectively. The Servlet works fine 
   when converted to a command line application.
  
   -Brian
  
   ---
  
  
   Error: 500
   Location: /examples/servlet/processOptions
   Internal Servlet Error:
  
   java.lang.NoClassDefFoundError: 
   com/sun/java/util/collections/AbstractSequentialList
at 
 org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java)
  
  
  
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [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: newbie - finding class files

2002-07-15 Thread Craig R. McClanahan



On Mon, 15 Jul 2002, Andreas Probst wrote:

 Date: Mon, 15 Jul 2002 13:07:11 +0200
 From: Andreas Probst [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: newbie - finding class files

 Hi all,

 does Tomcat really look into tomcatdir/server/lib? For me it seems
 Tomcat doesn't.


This directory is only visible to the classloader for Tomcat itself, not
for webapps.  There is a special rule that makes servlet classes in
package org.apache.catalina available to webapps anyway, however, which
is why the standard WebdavServlet (as well as the other Tomcat features
that are available via servlets) can be loaded.

Craig


 On the one hand the original webapp /webdav runs without errors. On
 the other hand, when I deploy a class that extends the original
 webdav-class org.apache.catalina.servlets.WebdavServlet (located in
 catalinahome\server\lib\servlets-webdav.jar) I get an
 java.lang.NoClassDefFoundError:
 org/apache/catalina/servlets/WebdavServlet.

 When I then copy catalinahome\server\lib\servlets-webdav.jar into
 catalinahome\webapps\mywebdav\WEB-INF\lib I get a different
 java.lang.NoClassDefFoundError:
 org/apache/catalina/servlets/DefaultServlet. DefaultServlet is
 located in catalinahome\server\lib\servlets-default.jar. So it seems
 Tomcat doesn't look into the catalinahome\server\lib\ directory. But
 why then runs the original /webdav app?

 What do I do wrong? Do I have to tell Tomcat somehow to look into the
 catalinahome\server\lib\ directory when running my webapp? Or do I
 have to copy all needed files from catalinahome\server\lib\ to my
 webapp's lib-directory? I suppose this shouldn't be the solution.

 By the way: I'm running Tomcat 4.0.4 on Windows 2000.

 Thanks a lot in advance.

 Andreas Probst

  Brian,
 
  Tomcat looks for your classes under
  Tomcatdir/webapps/yourapp/WEB-INF/classes and Tomcatdir/common/classes and
  looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib ,
  Tomcatdir/common/lib (and Tomcatdir/server/lib but you shouldn't put your
  stuff in here)
 
  Andy
 
   -Original Message-
   From: Brian Wolf [mailto:[EMAIL PROTECTED]]
   Sent: 11 July 2002 22:12
   To: Tomcat Users List
   Subject: newbie - finding class files
  
  
   Hi
  
   I am having problems with  servlets finding class files. On Windows 98
   I have the classpath and path environmental variables set to
   c:\jdk1.4\bin
   and c:\jdk1.4 respectively. The Servlet works fine when converted to a
   command line application.
  
   -Brian
  
   ---
  
  
   Error: 500
   Location: /examples/servlet/processOptions
   Internal Servlet Error:
  
   java.lang.NoClassDefFoundError:
   com/sun/java/util/collections/AbstractSequentialList
at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java)
  
  
  
 
 
 



 --
 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]




newbie - finding class files

2002-07-11 Thread Brian Wolf

Hi

I am having problems with  servlets finding class files. On Windows 98 
I have the classpath and path environmental variables set to c:\jdk1.4\bin 
and c:\jdk1.4 respectively. The Servlet works fine when converted to a
command line application.

-Brian

---
 

Error: 500
Location: /examples/servlet/processOptions
Internal Servlet Error:

java.lang.NoClassDefFoundError: com/sun/java/util/collections/AbstractSequentialList
 at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
 at org.jdom.input.SAXBuilder.build(SAXBuilder.java)





RE: newbie - finding class files

2002-07-11 Thread Andy Eastham

Brian,

Tomcat looks for your classes under
Tomcatdir/webapps/yourapp/WEB-INF/classes and Tomcatdir/common/classes and
looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib ,
Tomcatdir/common/lib (and Tomcatdir/server/lib but you shouldn't put your
stuff in here)

Andy

 -Original Message-
 From: Brian Wolf [mailto:[EMAIL PROTECTED]]
 Sent: 11 July 2002 22:12
 To: Tomcat Users List
 Subject: newbie - finding class files


 Hi

 I am having problems with  servlets finding class files. On Windows 98
 I have the classpath and path environmental variables set to
 c:\jdk1.4\bin
 and c:\jdk1.4 respectively. The Servlet works fine when converted to a
 command line application.

 -Brian

 ---


 Error: 500
 Location: /examples/servlet/processOptions
 Internal Servlet Error:

 java.lang.NoClassDefFoundError:
 com/sun/java/util/collections/AbstractSequentialList
  at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
  at org.jdom.input.SAXBuilder.build(SAXBuilder.java)






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]