cvs commit: jakarta-tomcat .cvsignore

2001-03-25 Thread nacho

nacho   01/03/25 03:45:09

  Added:   ..cvsignore
  Log:
  no message
  
  Revision  ChangesPath
  1.1  jakarta-tomcat/.cvsignore
  
  Index: .cvsignore
  ===
  build
  dist
  
  
  



RE: Still have XML loading problems

2001-03-25 Thread Kevin Jones

 The Jasper page compiler needs to have access to all of the bean classes
 that you might have placed in WEB-INF/classes and WEB-INF/lib.  This could
 be "faked" by setting up yet another class loader that simulates the
 "real" webapp class loader (in terms of what repositories it gives you
 visibility to), or by making the special Jasper class loader a sibling of
 the webapp class loader (rather than a child), and adding the WEB-INF
 repositories to it as well.

 This will work as long as you don't create an object in the Jasper class
 loader and then expect it to be visible in the webapp class loader (or
 vice versa) -- you get class cast exceptions at that point.

Craig, can we do this for now - it will solve these problems in the short
term and we can then think about re-writing Jasper?

Kevin Jones
DevelopMentor
www.develop.com





cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler JikesJavaCompiler.java

2001-03-25 Thread nacho

nacho   01/03/25 05:33:45

  Modified:src/share/org/apache/jasper/compiler JikesJavaCompiler.java
  Log:
  Bug#1056
  
  Jikes Compiler code fails under unix -patch
  
  Reporter: tom at 58k.com (Thomas Riemer)
  
  Revision  ChangesPath
  1.8   +30 -23
jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java
  
  Index: JikesJavaCompiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JikesJavaCompiler.java2001/01/14 20:45:40 1.7
  +++ JikesJavaCompiler.java2001/03/25 13:33:45 1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v 
1.7 2001/01/14 20:45:40 larryi Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/01/14 20:45:40 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v 
1.8 2001/03/25 13:33:45 nacho Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/03/25 13:33:45 $
*
* 
*
  @@ -77,10 +77,17 @@
   
   static final int OUTPUT_BUFFER_SIZE = 1024;
   static final int BUFFER_SIZE = 512;
  -
  +static final String q;
  +static {
  +if( System.getProperty("file.separator").equals("\\") ){
  +q="\"";
  +} else {
  +q="";
  +}
  +}
   /*
* Contains extra classpath for Jikes use from Microsoft systems:
  - * Microsoft does not report it's internal classpath in 
  + * Microsoft does not report it's internal classpath in
* System.getProperty(java.class.path) which results in jikes to fail.  
* (Internal classpath with other JVMs contains for instance rt.jar).
*/
  @@ -102,35 +109,35 @@
   
   /**
* Set the encoding (character set) of the source
  - */ 
  + */
   public void setEncoding(String encoding) {
 this.encoding = encoding;
   }
   
   /**
* Set the class path for the compiler
  - */ 
  + */
   public void setClasspath(String classpath) {
 this.classpath = classpath;
   }
   
   /**
* Set the output directory
  - */ 
  + */
   public void setOutputDir(String outdir) {
 this.outdir = outdir;
   }
   
   /**
  - * Set where you want the compiler output (messages) to go 
  - */ 
  + * Set where you want the compiler output (messages) to go
  + */
   public void setMsgOutput(OutputStream out) {
 this.out = out;
   }
   
   /**
  - * Set if you want debugging information in the class file 
  - */ 
  + * Set if you want debugging information in the class file
  + */
   public void setClassDebugInfo(boolean classDebugInfo) {
   this.classDebugInfo = classDebugInfo;
   }
  @@ -149,35 +156,35 @@
   MicrosoftClasspath = new StringBuffer(200);
   if (System.getProperty("java.vendor").startsWith("Microsoft")) {
   //Get Microsoft classpath
  -String javaHome = System.getProperty("java.home") + 
  +String javaHome = System.getProperty("java.home") +
 "\\Packages";
   File libDir=new File(javaHome);
   String[] zips=libDir.list();
   for(int i=0;izips.length;i++) {
   MicrosoftClasspath.append(";" + javaHome + "\\" + zips[i]);
  -}   
  -} 
  +}
  +}
   }
   
   String[] compilerCmd;
   if (classDebugInfo) {
compilerCmd = new String[] {
  - "\"" + compilerPath + "\"",
  + q + compilerPath + q,
   "-g",
//XXX - add encoding once Jikes supports it
  - "-classpath", "\"" + classpath + MicrosoftClasspath + "\"",
  - "-d", "\"" + outdir + "\"",
  + "-classpath", q + classpath + MicrosoftClasspath + q,
  + "-d", q + outdir + q,
"-nowarn",
  - "\"" + source + "\""
  + q + source + q
};
   } else {
compilerCmd = new String[] {
  - "\"" + compilerPath + "\"",
  + q + compilerPath + q,
//XXX - add encoding once Jikes supports it
  - "-classpath", "\"" + classpath + MicrosoftClasspath + "\"",
  - "-d", "\"" + outdir + "\"",
  + "-classpath", q + classpath + MicrosoftClasspath + q,
  + "-d", q + outdir + q,
"-nowarn",
  - "\"" + source + "\""
  + q + source + q
};
}
   
  
  
  



cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util IntrospectionUtils.java

2001-03-25 Thread larryi

larryi  01/03/25 13:53:18

  Modified:src/share/org/apache/tomcat/core ContextManager.java
   src/share/org/apache/tomcat/modules/config PathSetter.java
   src/share/org/apache/tomcat/startup Main.java
StopTomcat.java Tomcat.java
   src/share/org/apache/tomcat/util IntrospectionUtils.java
  Log:
  Allow separate "home" and "install" directories by specifying both, "home"
  using the "tomcat.home" System property and "install" using the
  "tomcat.install" System property.  If either is not specified, it defaults to the
  other. Classloader construction now uses "install" to find the "lib" jars.
  
  Revision  ChangesPath
  1.175 +5 -1  
jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -r1.174 -r1.175
  --- ContextManager.java   2001/03/14 03:45:17 1.174
  +++ ContextManager.java   2001/03/25 21:53:13 1.175
  @@ -153,9 +153,13 @@
   
   /** System property used to set the base directory ( tomcat home ).
*  use -DTOMCAT_HOME= in java command line or as a System.setProperty.
  - *  XXX hack - setHome is better
*/
   public static final String TOMCAT_HOME="tomcat.home";
  +
  +/** System property used to set the install directory ( tomcat install ).
  + *  use -DTOMCAT_INSTALL= in java command line or as a System.setProperty.
  + */
  +public static final String TOMCAT_INSTALL="tomcat.install";
   
   // State
   
  
  
  
  1.6   +20 -12
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PathSetter.java
  
  Index: PathSetter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/PathSetter.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PathSetter.java   2001/02/20 03:16:51 1.5
  +++ PathSetter.java   2001/03/25 21:53:14 1.6
  @@ -113,23 +113,30 @@
home=System.getProperty(ContextManager.TOMCAT_HOME);
}
   
  + // if "home" is not set, guess "install" and use as "home"
if( home==null ) {
  - home=IntrospectionUtils.guessHome( "tomcat.home",
  -"tomcat_core.jar",
  -"org/apache/tomcat/core/Request.class");
  + home=IntrospectionUtils.guessInstall(
  + ContextManager.TOMCAT_INSTALL,
  + ContextManager.TOMCAT_HOME,
  + "tomcat_core.jar",
  + "org/apache/tomcat/core/Request.class");
}
   
  - if (home == null) {
  - System.out.println(sm.getString("tomcat.nohome"));
  - home = ".";
  - // Assume current working directory
  + if (home != null) {
  + // Make it absolute
  + home=FileUtil.getCanonicalPath( home );
  + cm.setHome( home );
}
  -
  - // Make it absolute
  - home=FileUtil.getCanonicalPath( home );
  - cm.setHome( home );

String installDir=cm.getInstallDir();
  + // if "install" is not set, guess "install" if not already guessed
  + if ( installDir==null ) {
  + installDir=IntrospectionUtils.guessInstall(
  + ContextManager.TOMCAT_INSTALL,
  + ContextManager.TOMCAT_HOME,
  + "tomcat_core.jar",
  + "org/apache/tomcat/core/Request.class");
  + }
if( installDir!= null ) {
installDir=FileUtil.getCanonicalPath( installDir );
cm.setInstallDir( installDir );
  @@ -157,7 +164,8 @@
cm.setInstallDir( home );
}
   
  - System.getProperties().put("tomcat.home", cm.getHome());
  + System.getProperties().put(ContextManager.TOMCAT_HOME, cm.getHome());
  + System.getProperties().put(ContextManager.TOMCAT_INSTALL, cm.getInstallDir());
   }
   
   /** After server.xml is read - make sure the workDir is absolute,
  
  
  
  1.31  +13 -9 jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java
  
  Index: Main.java
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Main.java 2001/03/06 05:25:14 1.30
  +++ Main.java 2001/03/25 21:53:15 1.31
  @@ -1,4 +1,4 @@
  -/* $Id: Main.java,v 1.30 2001/03/06 05:25:14 larryi Exp $
  +/* $Id: Main.java,v 1.31 2001/03/25 21:53:15 larryi Exp $
* 

PATCH

2001-03-25 Thread Vitayaudom, Victor
Title: PATCH






I like to submit a minor patch to version 1.5 
of the build.xml for jakarta-servletapi.


Currently the build.xml places itself if the lib of the dist.
the build.xml copies java files to src rather than src/share,
which is what the build.xml is expecting.


The fix will allow downloads to rebuild servlet.jar without
having to figure out what went wrong when downloading and
rebuilding their own lib of the jakarta-serlvetapi.


-Valdis





 patchfile.txt


Tomcat SSL Direct Problem.

2001-03-25 Thread Eric Wong

I get the following exceptions form tomcat:

2001-03-22 03:47:18 - Ctx(  ): 400 R( /) null
2001-03-22 03:47:18 - Ctx(  ): IOException in: R( /) Socket closed

And the browser displays the following message:

The page cannot be displayed



I can get Tomcat SSL working if I generate the .keystore the following way:

keytool -genkey -alias tomcat -keyalg RSA

But when I:

1. generate a request and key;
openssl req -new -out REQ.pem -keyout KEY.pem 
2. generate a self signed certificate;
openssl req -x509 -in REQ.pem -key KEY.pem -out CERT.pem 
3. and finally import the certificate into the .keystore;
keytool -import -v -trustcacerts -alias tomcat -file
CERT.pem 

I need this to work so I can use a certificate from verisign.

Please help!!!

Thanks!!!

Eric W.



cvs commit: jakarta-tomcat-4.0/catalina/docs manager.html

2001-03-25 Thread glenn

glenn   01/03/25 19:21:57

  Modified:catalina/docs manager.html
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.3   +33 -24jakarta-tomcat-4.0/catalina/docs/manager.html
  
  Index: manager.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/manager.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- manager.html  2001/01/14 01:31:44 1.2
  +++ manager.html  2001/03/26 03:21:56 1.3
  @@ -19,13 +19,15 @@
   h3Introduction/h3
   
   pTomcat ships with a web application (by default installed at context
  -path code/manager/code) that facilitates deploying, undeploying, and
  -reloading (that is, forcing a reload of all class files without removing the
  -application from service) of other applications that are running in the same
  -virtual host as the Manager application itself.  This application is suited
  -to scripted operation, because it can be executed from any client program that
  -can issue HTTP requests.  As such, it is complementary to other administrative
  -applications that have a more human-oriented user interface./p
  +path code/manager/code) that facilitates installing, starting, stopping,
  +removing, listing information, and reloading (that is, forcing a reload of
  +all class files without removing the application from service) of other web
  +applications that are running in the same virtual host as the Manager
  +application itself.
  +This application is suited to scripted operation, because it can be executed
  +from any client program that can issue HTTP requests.  As such, it is
  +complementary to other administrative applications that have a more
  +human-oriented user interface./p
   
   pstrongWARNING/strong - As of the Tomcat 4.0 milestone 2 release, there
   is a bug in the operation of the "deploy" command that prevents deploying,
  @@ -43,27 +45,36 @@
   have installed the Manager application on context path code/manager/code
   on your local host installation of Tomcat./p
   ul
  -libhttp://localhost:8080/manager/list/b - List the context paths of all
  -web applications currently deployed on the virtual host in which this
  -manager application is deployed./li
  -libhttp://localhost:8080/manager/deploy?path=/xxxamp;war=yyy/b -
  -Deploy the web application whose WAR file (or directory containing the
  +libhttp://localhost:8080/manager/install?path=/xxxamp;war=yyy/b -
  +Install the web application whose WAR file (or directory containing the
   unpacked application) is present at URL codeyyy/code, and attach it
   to context path code/xxx/code.  See below for valid syntax options
   for the web applcation archive URl.  If the URL of an actual WAR file
   is specified, the WAR will be automatically expanded into a directory
   underneath the application base for this virtual host./li
  +libhttp://localhost:8080/manager/list/b - List the context paths
  +of all currently installed web applications for this virtual host.
  +Each context will be listed with the following format
  +codepath:status:sessions/code.  Where path is the context
  +path. Status is either running or stopped. Sessions is the number of
  +active Sessions./li
   libhttp://localhost:8080/manager/reload?path=/xxx/b - Cause the web
  -application deployed at context path code/xxx/code to reload all its
  +application installed at context path code/xxx/code to reload all its
   associated Java classes, even if automatic reloading is disabled./li
  -libhttp://localhost:8080/manager/undeploy?path=/xxx/b - Cause the web
  -application deployed at context path code/xxx/code to be gracefully
  -shut down and undeployed.  If a WAR file was automatically expanded into
  -an unpacked directory when this application was deployed (or when the
  -servlet container was first started), the expanded directory is deleted.
  -/li
  +libhttp://localhost:8080/manager/remove?path=/xxx/b - Cause the web
  +application installed at context path code/xxx/code to be gracefully
  +shutdown and delete the web application directory and files./li
  +libhttp://localhost:8080/manager/sessions?path=/xxx/b - List session
  +information about the web application attached to context path
  +code/xxx/code for this virtual host./li
  +libhttp://localhost:8080/manager/start?path=/xxx/b - Start the web
  +application attached to context path code/xxx/code for this
  +virtual host./li
  +libhttp://localhost:8080/manager/stop?path=/xxx/b - Stop the web
  +application attached to context path code/xxx/code for this
  +virtual host./li
   /ul
  -
  +pUse codepath=//code for the ROOT context./p
   pThe syntax of the URL for a web application archive must conform to one
   of the following patterns to be successfully 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina Deployer.java

2001-03-25 Thread glenn

glenn   01/03/25 19:22:14

  Modified:catalina/src/share/org/apache/catalina Deployer.java
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.2   +55 -23
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java
  
  Index: Deployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Deployer.java 2000/10/04 23:03:03 1.1
  +++ Deployer.java 2001/03/26 03:22:14 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.1 2000/10/04 23:03:03 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/10/04 23:03:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Deployer.java,v 
1.2 2001/03/26 03:22:14 glenn Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/03/26 03:22:14 $
*
* 
*
  @@ -76,7 +76,7 @@
* for each web application will be the context path to which it is attached.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/10/04 23:03:03 $
  + * @version $Revision: 1.2 $ $Date: 2001/03/26 03:22:14 $
*/
   
   public interface Deployer extends Container {
  @@ -87,46 +87,46 @@
   
   /**
* The ContainerEvent event type sent when a new application is
  - * deployed by codedeploy()/code.
  + * installed by codeinstall()/code.
*/
  -public static final String DEPLOY_EVENT = "deploy";
  +public static final String INSTALL_EVENT = "install";
   
   
   /**
* The ContainerEvent event type sent when an existing application is
  - * undeployed by codeundeploy()/code.
  + * removed by coderemove()/code.
*/
  -public static final String UNDEPLOY_EVENT = "undeploy";
  +public static final String REMOVE_EVENT = "remove";
   
   
   // - Public Methods
   
   
   /**
  - * Deploy a new web application, whose web application archive is at the
  + * Install a new web application, whose web application archive is at the
* specified URL, into this container with the specified context path.
* A context path of "" (the empty string) should be used for the root
* application for this container.  Otherwise, the context path must
* start with a slash.
* p
  - * If this application is successfully deployed, a ContainerEvent of type
  - * codeDEPLOY_EVENT/code will be sent to all registered listeners,
  + * If this application is successfully installed, a ContainerEvent of type
  + * codeINSTALL_EVENT/code will be sent to all registered listeners,
* with the newly created codeContext/code as an argument.
*
* @param contextPath The context path to which this application should
  - *  be deployed (must be unique)
  + *  be installed (must be unique)
* @param war A URL of type "jar:" that points to a WAR file, or type
*  "file:" that points to an unpacked directory structure containing
  - *  the web application to be deployed
  + *  the web application to be installed
*
* @exception IllegalArgumentException if the specified context path
*  is malformed (it must be "" or start with a slash)
* @exception IllegalArgumentException if the specified context path
*  is already attached to an existing web application
* @exception IOException if an input/output error was encountered
  - *  during deployment
  + *  during installation
*/
  -public void deploy(String contextPath, URL war) throws IOException;
  +public void install(String contextPath, URL war) throws IOException;
   
   
   /**
  @@ -148,22 +148,54 @@
   
   
   /**
  - * Undeploy an existing web application, attached to the specified context
  - * path.  If this application is successfully undeployed, a
  - * ContainerEvent of type codeUNDEPLOY_EVENT/code will be sent to all
  - * registered listeners, with the undeployed codeContext/code as
  + * Remove an existing web application, attached to the specified context
  + * path.  If this application is successfully removed, a
  + * ContainerEvent of type codeREMOVE_EVENT/code will be sent to all
  + * registered listeners, with the removed codeContext/code as
* an argument.
*
  - * @param contextPath The context path of the application to be undeployed
  + * @param contextPath The context path of the application to be removed
*
* @exception IllegalArgumentException if the specified context path

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core LocalStrings.properties

2001-03-25 Thread glenn

glenn   01/03/25 19:22:35

  Modified:catalina/src/share/org/apache/catalina/core
LocalStrings.properties
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.25  +6 -4  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/LocalStrings.properties,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- LocalStrings.properties   2001/03/18 05:32:12 1.24
  +++ LocalStrings.properties   2001/03/26 03:22:35 1.25
  @@ -77,8 +77,8 @@
   standardHost.accessBase=Cannot access document base directory {0}
   standardHost.alreadyStarted=Host has already been started
   standardHost.appBase=Application base directory {0} does not exist
  -standardHost.deploying=Deploying web application at context path {0} from URL {1}
  -standardHost.deployError=Error deploying application at context path {0}
  +standardHost.installing=Installing web application at context path {0} from URL {1}
  +standardHost.installError=Error deploying application at context path {0}
   standardHost.docBase=Document base directory {0} already exists
   standardHost.mappingError=MAPPING configuration error for request URI {0}
   standardHost.noContext=No Context configured to process this request
  @@ -90,8 +90,10 @@
   standardHost.pathMissing=Context path {0} is not currently in use
   standardHost.pathRequired=Context path is required
   standardHost.pathUsed=Context path {0} is already in use
  -standardHost.undeploying=Undeploying web application at context path {0}
  -standardHost.undeployError=Error undeploying application at context path {0}
  +standardHost.removing=Removing web application at context path {0}
  +standardHost.removeError=Error removing application at context path {0}
  +standardHost.start=Starting web application at context path {0}
  +standardHost.stop=Stopping web application at context path {0}
   standardHost.unfoundContext=Cannot find context for request URI {0}
   standardHost.warRequired=URL to web application archive is required
   standardHost.warURL=Invalid URL for web application archive: {0}
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardHost.java

2001-03-25 Thread glenn

glenn   01/03/25 19:22:57

  Modified:catalina/src/share/org/apache/catalina/core
StandardHost.java
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.10  +127 -54   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardHost.java 2001/02/26 03:52:21 1.9
  +++ StandardHost.java 2001/03/26 03:22:57 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.9 2001/02/26 03:52:21 glenn Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/02/26 03:52:21 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
 1.10 2001/03/26 03:22:57 glenn Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/03/26 03:22:57 $
*
* 
*
  @@ -83,9 +83,11 @@
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.Deployer;
  +import org.apache.catalina.Globals;
   import org.apache.catalina.HttpRequest;
   import org.apache.catalina.Host;
   import org.apache.catalina.Lifecycle;
  +import org.apache.catalina.LifecycleException;
   import org.apache.catalina.LifecycleListener;
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
  @@ -98,7 +100,7 @@
* requests directed to a particular web application.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/02/26 03:52:21 $
  + * @version $Revision: 1.10 $ $Date: 2001/03/26 03:22:57 $
*/
   
   public class StandardHost
  @@ -152,15 +154,6 @@
   
   
   /**
  - * The set of absolute pathnames to directories that were expanded
  - * from WAR files, keyed by context path.  These entries may be used
  - * to indicate that the expanded directory is to be removed when the
  - * application is undeployed.
  - */
  -private HashMap expanded = new HashMap();
  -
  -
  -/**
* The descriptive information string for this implementation.
*/
   private static final String info =
  @@ -185,6 +178,7 @@
*/
   private DefaultContext defaultContext;
   
  +
   // - Properties
   
   
  @@ -528,30 +522,30 @@
   
   
   /**
  - * Deploy a new web application, whose web application archive is at the
  + * Install a new web application, whose web application archive is at the
* specified URL, into this container with the specified context path.
* A context path of "" (the empty string) should be used for the root
* application for this container.  Otherwise, the context path must
* start with a slash.
* p
  - * If this application is successfully deployed, a ContainerEvent of type
  - * codeDEPLOY_EVENT/code will be sent to all registered listeners,
  + * If this application is successfully installed, a ContainerEvent of type
  + * codeINSTALL_EVENT/code will be sent to all registered listeners,
* with the newly created codeContext/code as an argument.
*
* @param contextPath The context path to which this application should
  - *  be deployed (must be unique)
  + *  be installed (must be unique)
* @param war A URL of type "jar:" that points to a WAR file, or type
*  "file:" that points to an unpacked directory structure containing
  - *  the web application to be deployed
  + *  the web application to be installed
*
* @exception IllegalArgumentException if the specified context path
*  is malformed (it must be "" or start with a slash)
* @exception IllegalArgumentException if the specified context path
*  is already attached to an existing web application
* @exception IOException if an input/output error was encountered
  - *  during deployment
  + *  during install
*/
  -public void deploy(String contextPath, URL war) throws IOException {
  +public void install(String contextPath, URL war) throws IOException {
   
   // Validate the format and state of our arguments
   if (contextPath == null)
  @@ -570,7 +564,7 @@
   // Prepare the local variables we will require
   String url = war.toString();
   String docBase = null;
  -log(sm.getString("standardHost.deploying", contextPath, url));
  +log(sm.getString("standardHost.installing", contextPath, url));
   
   // Expand a WAR archive into 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets LocalStrings.properties

2001-03-25 Thread glenn

glenn   01/03/25 19:23:20

  Modified:catalina/src/share/org/apache/catalina/servlets
LocalStrings.properties
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.5   +10 -3 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/LocalStrings.properties,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- LocalStrings.properties   2001/01/23 04:47:57 1.4
  +++ LocalStrings.properties   2001/03/26 03:23:20 1.5
  @@ -7,21 +7,28 @@
   invokerServlet.notNamed=Cannot call invoker servlet with a named dispatcher
   managerServlet.alreadyContext=FAIL - Application already exists at path {0}
   managerServlet.cannotInvoke=Cannot invoke manager servlet through invoker
  -managerServlet.deployed=OK - Deployed application at context path {0}
   managerServlet.exception=FAIL - Encountered exception {0}
  +managerServlet.installed=OK - Installed application at context path {0}
   managerServlet.invalidPath=FAIL - Invalid context path {0} was specified
   managerServlet.invalidWar=FAIL - Invalid application URL {0} was specified
   managerServlet.listed=OK - Listed applications for virtual host {0}
  +managerServlet.listitem={0}:{1}:{2}:{3}
   managerServlet.noCommand=FAIL - No command was specified
   managerServlet.noContext=FAIL - No context exists for path {0}
   managerServlet.noPath=FAIL - No context path was specified
   managerServlet.noRole=FAIL - User does not possess role {0}
   managerServlet.reloaded=OK - Reloaded application at context path {0}
  -managerServlet.undeployed=OK - Undeployed application at context path {0}
  +managerServlet.removed=OK - Removed application at context path {0}
  +managerServlet.sessiondefaultmax=Default maximum session inactive interval {0} 
minutes
  +managerServlet.sessiontimeout={0} minutes:{1} sessions
  +managerServlet.sessions=OK - Session information for application at context path {0}
  +managerServlet.started=OK - Started application at context path {0}
  +managerServlet.stopped=OK - Stopped application at context path {0}
  +managerServlet.unknownCommand=FAIL - Unknown command {0}
   webdavservlet.jaxpfailed=JAXP initialization failed
   directory.filename=Filename
   directory.lastModified=Last Modified
   directory.parent=Up To {0}
   directory.size=Size
   directory.title=Directory Listing For {0}
  -directory.version=Tomcat Catalina version 4.1
  \ No newline at end of file
  +directory.version=Tomcat Catalina version 4.0
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets ManagerServlet.java

2001-03-25 Thread glenn

glenn   01/03/25 19:23:35

  Modified:catalina/src/share/org/apache/catalina/servlets
ManagerServlet.java
  Log:
  Improve webapp unpack WAR file behaviour and enhance manager servlet
  
  Revision  ChangesPath
  1.4   +242 -46   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ManagerServlet.java   2001/01/03 02:20:46 1.3
  +++ ManagerServlet.java   2001/03/26 03:23:35 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.3 2001/01/03 02:20:46 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/01/03 02:20:46 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.4 2001/03/26 03:23:35 glenn Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/03/26 03:23:35 $
*
* 
*
  @@ -78,6 +78,7 @@
   import org.apache.catalina.Deployer;
   import org.apache.catalina.HttpRequest;
   import org.apache.catalina.HttpResponse;
  +import org.apache.catalina.Session;
   import org.apache.catalina.Wrapper;
   import org.apache.catalina.util.StringManager;
   
  @@ -94,19 +95,48 @@
* The following actions and parameters (starting after the servlet path)
* are supported:
* ul
  - * lib/list/b - Return a list of the context paths of all currently
  - * running web applications in this virtual host.
  - * lib/deploy?path=/xxxwar={war-url}/b - Deploy a new web application
  - * attached to context path code/xxx/code, based on the contents of
  - * the web application archive found at the specified URL.
  + * lib/install?path=/xxxwar={war-url}/b - Install and start a new
  + * web application attached to context path code/xxx/code, based
  + * on the contents of the web application archive found at the
  + * specified URL./li
  + * lib/list/b - List the context paths of all currently installed web
  + * applications for this virtual host.  Each context will be listed with
  + * the following format codepath:status:sessions/code.
  + * Where path is the context path.  Status is either running or stopped.
  + * Sessions is the number of active Sessions./li
* lib/reload?path=/xxx/b - Reload the Java classes and resources for
* the application at the specified path, but do not reread the web.xml
  - * configuration files.
  - * lib/undeploy?path=/xxx/b - Remove any web application attached to
  - * context path code/xxx/code from this virtual host.
  + * configuration files./li
  + * lib/remove?path=/xxx/b - Shutdown and remove the web application
  + * attached to context path code/xxx/code for this virtual host./li
  + * lib/sessions?path=/xxx/b - List session information about the web
  + * application attached to context path code/xxx/code for this
  + * virtual host./li
  + * lib/start?path=/xxx/b - Start the web application attached to
  + * context path code/xxx/code for this virtual host./li
  + * lib/stop?path=/xxx/b - Stop the web application attached to
  + * context path code/xxx/code for this virtual host./li
* /ul
  + * pUse codepath=//code for the ROOT context./p
  + * pThe syntax of the URL for a web application archive must conform to one
  + * of the following patterns to be successfully deployed:/p
  + * ul
  + * libfile:/absolute/path/to/a/directory/b - You can specify the absolute
  + * path of a directory that contains the unpacked version of a web
  + * application.  This directory will be attached to the context path you
  + * specify without any changes./li
  + * libjar:file:/absolute/path/to/a/warfile.war!//b - You can specify a
  + * URL to a local web application archive file.  The syntax must conform to
  + * the rules specified by the codeJarURLConnection/code class for a
  + * reference to an entire JAR file./li
  + * libjar:http://hostname:port/path/to/a/warfile.war!//b - You can specify
  + * a URL to a remote (HTTP-accessible) web application archive file.  The
  + * syntax must conform to the rules specified by the
  + * codeJarURLConnection/code class for a reference to an entire
  + * JAR file./li
  + * /ul
* p
  - * bNOTE/b - Attempting to reload or undeploy the application containing
  + * bNOTE/b - Attempting to reload or remove the application containing
* this servlet itself will not succeed.  Therefore, this servlet should
* generally be deployed as a separate web application within the virtual host
* to be managed.
  @@