tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Embedded.java
Date Mon, 16 Oct 2000 18:27:57 GMT
craigmcc    00/10/16 11:27:54

  Modified:    catalina/src/bin catalina.sh
               catalina/src/share/org/apache/catalina/startup Embedded.java
  Log:
  Update the example main() method in the Embedded class to reflect changes
  in the refactoring of context startup, and to document the option to use
  the new deploy() method.
  
  When using the Embedded class, you will also need to include the JAR files
  in $CATALINA_HOME/server on your system classpath, or else build a custom
  class loader for these classes the way that
  org.apache.catalina.startup.Bootstrap does.  The startup script has been
  modified to do the former when you use the "embedded" option.
  
  Revision  Changes    Path
  1.7       +5 -1      jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- catalina.sh	2000/09/30 19:47:08	1.6
  +++ catalina.sh	2000/10/16 18:27:45	1.7
  @@ -12,7 +12,7 @@
   #
   #   JAVA_HOME     Must point at your Java Development Kit installation.
   #
  -# $Id: catalina.sh,v 1.6 2000/09/30 19:47:08 craigmcc Exp $
  +# $Id: catalina.sh,v 1.7 2000/10/16 18:27:45 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -67,6 +67,10 @@
   elif [ "$1" = "embedded" ] ; then
   
     shift
  +  for i in ${CATALINA_HOME}/server/*.jar ; do
  +    CP=$i:${CP}
  +  done
  +  echo Embedded Classpath: $CP
     java $CATALINA_OPTS -classpath $CP \
      -Dcatalina.home=$CATALINA_HOME \
      org.apache.catalina.startup.Embedded "$@"
  
  
  
  1.3       +13 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java
  
  Index: Embedded.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Embedded.java	2000/09/08 22:45:32	1.2
  +++ Embedded.java	2000/10/16 18:27:51	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
1.2 2000/09/08 22:45:32 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/08 22:45:32 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Embedded.java,v
1.3 2000/10/16 18:27:51 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/10/16 18:27:51 $
    *
    * ====================================================================
    *
  @@ -145,7 +145,7 @@
    * </pre>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/09/08 22:45:32 $
  + * @version $Revision: 1.3 $ $Date: 2000/10/16 18:27:51 $
    */
   
   public class Embedded implements Lifecycle {
  @@ -961,6 +961,14 @@
   	customize(examples);	// Special customization for this web-app
   	host.addChild(examples);
   
  +        // As an alternative to the three lines above, there is also a very
  +        // simple method to deploy a new application that has default values
  +        // for all context properties:
  +        //   String contextPath = ... context path for this app ...
  +        //   URL docRoot = ... URL of WAR file or unpacked directory ...
  +        //   ((Deployer) host).deploy(contextPath, docRoot);
  +
  +        // Install the assembled container hierarchy
   	embedded.addEngine(engine);
   
   	// Assemble and install a non-secure connector for port 8080
  @@ -1012,8 +1020,7 @@
   	    basename = basename.substring(1);
   
   	FileLogger special = new FileLogger();
  -	special.setPrefix(context.getParent().getName() + "_" +
  -			  basename + "_log.");
  +	special.setPrefix(basename + "_log.");
   	special.setSuffix(".txt");
   	special.setTimestamp(true);
   
  
  
  

Mime
View raw message