Re: [PATCH] [3.3] etomcat target

2001-12-27 Thread costinm

Thanks Jeff,

> Incidentally, any tips on classloaders and EmbededTomcat? Everything
> starts fine, but my servlet can't see any classes in WEB-INF/lib
> *unless* I explicitly use the context classloader. Oh well, that's for
> another mail.

Very strange. If the servlet is loaded from WEB-INF/lib, I don't see how
it can't see other classes in there.

If the servlet happens to be in the CLASSPATH or container class loader -
then it's normal for it to not see the classes in the child class loader,
unless it uses the context class loader ( or the Thread class loader ).

Costin


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] [3.3] etomcat target

2001-12-25 Thread Denis Balazuc


- Original Message -
From: "Jeff Turner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 26, 2001 1:10 AM
Subject: [PATCH] [3.3] etomcat target


> Hi,
>
> On the 17th, Costin added an 'etomcat' target:
>
> > Added a target to build 'embeded' style tomcat, i.e. a single jar
containing
> > everything ( no more lib/container, etc ). It is self-runnable and
should start
> > tomcat with the defaults settings ( no server.xml, etc ) using the
current dir
> > as base.  Just add webapps and shake.
>
> > This is nice for people who just need a simple jar with no strings
attached (
> > configs, dir structure, etc ).
>
> It looked pretty broken when I tried it. The attached patch gets it
> compiled, I can now successfully start it by typing 'java
> -Dtomcat.home=... -jar webserver.jar'.
>
> The changes are:
>  - Declare dep on target that creates build/classes
>  - Change nonexistent ${servlet.jar} to ${servlet22.jar}
>  - Exclude all *SSL*, *JSSE*, *TLS* java files unless jsse.present. The
>the previous approach of explicitly naming each class was not robust
>enough. I found fully 9 other classes that weren't being excluded.
>  - Add the missing manifest.webserver, which I *guessed* should invoke
>EmbededTomcat with the classpath crimson.jar and servlet22.jar
>  - Minor javadoc fixes in EmbededTomcat.java.
>
>
> Incidentally, any tips on classloaders and EmbededTomcat? Everything
> starts fine, but my servlet can't see any classes in WEB-INF/lib
> *unless* I explicitly use the context classloader. Oh well, that's for
> another mail.
>
> Thanks,
>
> --Jeff
>






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




[PATCH] [3.3] etomcat target

2001-12-25 Thread Jeff Turner

Hi,

On the 17th, Costin added an 'etomcat' target:

> Added a target to build 'embeded' style tomcat, i.e. a single jar containing
> everything ( no more lib/container, etc ). It is self-runnable and should start
> tomcat with the defaults settings ( no server.xml, etc ) using the current dir
> as base.  Just add webapps and shake.

> This is nice for people who just need a simple jar with no strings attached (
> configs, dir structure, etc ).

It looked pretty broken when I tried it. The attached patch gets it
compiled, I can now successfully start it by typing 'java
-Dtomcat.home=... -jar webserver.jar'.

The changes are:
 - Declare dep on target that creates build/classes
 - Change nonexistent ${servlet.jar} to ${servlet22.jar}
 - Exclude all *SSL*, *JSSE*, *TLS* java files unless jsse.present. The
   the previous approach of explicitly naming each class was not robust
   enough. I found fully 9 other classes that weren't being excluded.
 - Add the missing manifest.webserver, which I *guessed* should invoke
   EmbededTomcat with the classpath crimson.jar and servlet22.jar
 - Minor javadoc fixes in EmbededTomcat.java.


Incidentally, any tips on classloaders and EmbededTomcat? Everything
starts fine, but my servlet can't see any classes in WEB-INF/lib
*unless* I explicitly use the context classloader. Oh well, that's for
another mail.

Thanks,

--Jeff


? .bash_history
? .cvsrc
? .projrc
? .viminfo
? .vimrc
? etomcat.patch
Index: build.xml
===
RCS file: /home/cvspublic/jakarta-tomcat/build.xml,v
retrieving revision 1.162
diff -u -r1.162 build.xml
--- build.xml   2001/12/17 05:31:45 1.162
+++ build.xml   2001/12/25 14:00:15
@@ -598,7 +598,7 @@
 
   
 
-  
+  
 
 
 
-
+
   
   
-  
-  
-  
-  
-  
+ 
   
   
+   unless="jdk12.present"/>
   
-  
-  
 
 
@@ -657,7 +651,7 @@
 
 
 
-
+
 
 This class is designed as a java bean, where you set different properties,
  *  then call methods to perform actions. The main method is "execute", that
- *  will start tomcat. Few other methods allow to perform different other tasks.
+ *  will start tomcat. Few other methods allow to perform different other
+ *  tasks.
  *
- *  EmbededTomcat is usable as an "ant" task as well, using the TaskAdapter.
- *  ( see sample - TODO XXX ).
+ *  EmbededTomcat is usable as an "ant" task as well, using the TaskAdapter.
+ *  ( see sample - TODO XXX ).
  * 
- *  Adding tomcat to your application:
+ *  Adding tomcat to your application:
  * 
- *  - Create a java class that will act as adapter and start tomcat ( and
+ *  
+ *Create a java class that will act as adapter and start tomcat ( and
  *hold your customization code ). The class and all the files in
  *TOMCAT_HOME/lib/common must be available in the class loader.
  *lib/container and lib/apps should  _not_ be visible, EmbededTomcat
  *will handle that. All the application files you want visible from 
  *tomcat must be included as well.
- *ADVANCED1. Completely separated classloader
+ *ADVANCED1. Completely separated classloader
  *
- *  - In your adapter, create an instance of EmbededTomcat.
+ *In your adapter, create an instance of EmbededTomcat.
  * 
- *  - set properties you want to customize. 
+ *set properties you want to customize.
  *  
- *  - add all interceptors including your application-specific. That includes
- *   the connector modules ( shortcuts are provided for common sets of
- *   modules and for common connector configuration ).
+ *add all interceptors including your application-specific. That
+ *includes the connector modules ( shortcuts are provided for common sets of
+ *modules and for common connector configuration ).
  *
- *  - add the root context ( required ) and any other contexts you want.
+ *add the root context ( required ) and any other contexts you want.
  *More context can be added at runtime. You can also use existing
- *configuration modules that automatically add/deploy Contexts. 
+ *configuration modules that automatically add/deploy Contexts.
  *
- *  -  call start(). Tomcat will initialize and start. The method returns
- * when everything is ready.
+ *call start(). Tomcat will initialize and start. The method returns
+ *when everything is ready.
  * 
- *  -  You can add/remove contexts at runtime.
+ *You can add/remove contexts at runtime.
  *
- *  -  call stop(). Tomcat will clean up all resources and shutdown ( clean 
- * shutdown ). All common modules have been tested and shouldn't leave
- * any garbage, however it is possible that user code will leave threads
- * or other garbage ( i.e. not clean on destroy ). If tomcat is run in
- * a sandbox, this shouldn't be a problem ( as untrusted servlets can't
- * create threads ). It is your responsiblit