tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r777268 - /tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
Date Thu, 21 May 2009 21:30:23 GMT
Author: markt
Date: Thu May 21 21:30:23 2009
New Revision: 777268

URL: http://svn.apache.org/viewvc?rev=777268&view=rev
Log:
Make a few methods static so they can easily be used from other classes (like LifecycleListeners)
Add a note about manual context configuration and reload.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=777268&r1=777267&r2=777268&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Thu May 21 21:30:23 2009
@@ -178,6 +178,10 @@
      *    ctx.addErrorPage(ep);
      *   
      * ctx.addMimeMapping("ext", "type");
+     * 
+     * Note: If you reload the Context, all your configuration will be lost. If
+     * you need reload support, consider using a LifecycleListener to provide
+     * your configuration.
      *  
      * TODO: add the rest
      *
@@ -212,7 +216,7 @@
      * 
      *    wrapper.addInitParameter("name", "value");
      */
-    public StandardWrapper addServlet(StandardContext ctx, 
+    public static StandardWrapper addServlet(StandardContext ctx, 
                                       String servletName, 
                                       String servletClass) {
         // will do class for name and set init params
@@ -227,7 +231,7 @@
     /** Use an existing servlet, no class.forName or initialization will be 
      *  performed
      */
-    public StandardWrapper addServlet(StandardContext ctx,
+    public static StandardWrapper addServlet(StandardContext ctx,
                                       String servletName, 
                                       Servlet servlet) {
         // will do class for name and set init params
@@ -525,7 +529,7 @@
      *  TODO: in normal tomcat, if default-web.xml is not found, use this 
      *  method
      */
-    protected void initWebappDefaults(StandardContext ctx) {
+    public static void initWebappDefaults(StandardContext ctx) {
         // Default servlet 
         StandardWrapper servlet = 
             addServlet(ctx, "default", 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message