cvs commit: jakarta-tomcat/src/shell startup2.bat tomcat2.bat

2001-02-05 Thread nacho

nacho   01/02/05 18:46:31

  Modified:.build.xml
   src/facade22/org/apache/tomcat/facade JspInterceptor.java
   src/share/org/apache/jasper/compiler JasperMangler.java
   src/share/org/apache/tomcat/modules/config
LoaderInterceptor11.java
   src/share/org/apache/tomcat/startup Main.java Tomcat.java
   src/share/org/apache/tomcat/util/compat Jdk11Compat.java
Jdk12Support.java
  Added:   src/shell startup2.bat tomcat2.bat
  Log:
  This commit is intented to let Tomcat33
  to use a classloader for internal classes
  isolating tomcat internal classes on
  his own classloader and with a common
  repository with only servlet.jar in it ...
  
  * Start a webapp in a true isolated sandbox shielded from any jar needed to run 
Tomcat itself i.e no more xml parser & coocon blues :)
  
  * Be able to mix isolated ( aka trusted ) and non isolated apps in the same server.
  
  Sorry to send only bats i dont know sh at all..
  but they only start Tomcat with only a jar in classpath tomcat.jar,
  basicly it contains classes needed for bootstraping tomcat and can be used on jdk11 
systems too.
  
  build the new dir layout doing "build new",
  and using "startup2.bat" to start it,
  then you can try i.e use crimson for tomcat
  and xerces for Cocoon without put xerces in
  the server classpath.
  
  Revision  ChangesPath
  1.107 +30 -0 jakarta-tomcat/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- build.xml 2001/01/25 05:07:32 1.106
  +++ build.xml 2001/02/06 02:46:24 1.107
  @@ -78,6 +78,8 @@
  file="${ant.home}/lib/parser.jar"/>
   
   
  +
  +
   
   
  +  
  +
   
 
  
  @@ -417,6 +446,7 @@
   
   
 
  +
 
 
 
  
  
  
  1.12  +23 -7 
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JspInterceptor.java   2001/02/01 04:44:57 1.11
  +++ JspInterceptor.java   2001/02/06 02:46:25 1.12
  @@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* .
*
  - */ 
  + */
   package org.apache.tomcat.facade;
   
   import javax.servlet.*;
  @@ -67,6 +67,7 @@
   import org.apache.tomcat.util.log.*;
   import org.apache.tomcat.util.*;
   import org.apache.tomcat.util.depend.*;
  +import org.apache.tomcat.util.compat.*;
   
   import org.apache.jasper.*;
   import org.apache.jasper.Constants;
  @@ -594,6 +595,7 @@
   javac.setEncoding(javaEncoding);
String cp=System.getProperty("java.class.path")+ sep + 
ctxt.getClassPath() + sep + ctxt.getOutputDir();
  +//System.out.println("classpath:"+cp);
   javac.setClasspath( cp );
if( debug>5) log.log( "ClassPath " + cp);

  @@ -652,16 +654,29 @@
   }
   
   private String computeClassPath(Context ctx) {
  - URL classP[]=ctx.getClassPath();
String separator = System.getProperty("path.separator", ":");
  + URL classP[]=ctx.getClassPath();
   String cpath = "";
  -for(int i=0; i< classP.length; i++ ) {
  -URL cp = classP[i];
  +cpath+=extractClassPath(classP);
  +Jdk11Compat jdkProxy=Jdk11Compat.getJdkCompat();
  +URL serverCP[];
  +URL commonCP[];
  +serverCP=jdkProxy.getParentURLs(this.getClass().getClassLoader());
  +commonCP=jdkProxy.getURLs(this.getClass().getClassLoader());
  +cpath+=separator+extractClassPath(serverCP);
  +cpath+=separator+extractClassPath(commonCP);
  + return cpath;
  +}
  +String extractClassPath(URL urls[]){
  + String separator = System.getProperty("path.separator", ":");
  +String cpath="";
  +for(int i=0; i< urls.length; i++ ) {
  +URL cp = urls[i];
   File f = new File( cp.getFile());
   if (cpath.length()>0) cpath += separator;
   cpath += f;
   }
  - return cpath;
  +return cpath;
   }
   
   private JspCompilationContext createCompilationContext( Request req,
  @@ -672,13 +687,14 @@
ctxt.setServletClassName( mangler.getClassName());
ctxt.setJspFile( req.servletPath().toString());
ctxt.setClassPath( computeClassPath( req.getContext()) );
  +//System.out.println("computeClasspath:"+ctxt.getClassPath());
ctxt.setServletContext( req.getContext().getFacade());
c

cvs commit: jakarta-tomcat/src/shell startup2.bat tomcat2.bat

2001-02-06 Thread nacho

nacho   01/02/06 08:51:52

  Modified:src/etc  server.xml
  Removed: src/shell startup2.bat tomcat2.bat
  Log:
  Change the server.xml to use the new parentClassloader, by default
  
  Revision  ChangesPath
  1.68  +4 -2  jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- server.xml2001/02/02 04:56:45 1.67
  +++ server.xml2001/02/06 16:51:51 1.68
  @@ -36,7 +36,7 @@
   className="org.apache.tomcat.modules.loggers.LogEvents" 
-->
   
  -
   
   
   
  +
   
  +className="org.apache.tomcat.modules.config.LoaderInterceptor11"
  +useApplicationLoader="true" />
   
   
  
  
  

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




RE: cvs commit: jakarta-tomcat/src/shell startup2.bat tomcat2.bat

2001-02-05 Thread Ignacio J. Ortega

>   This commit is intented to let Tomcat33
>   to use a classloader for internal classes
>   isolating tomcat internal classes on
>   his own classloader and with a common

Nice demonstration of my capability to write songs in swahili, :))

Saludos ,
Ignacio J. Ortega


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