tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager ManagerServlet.java
Date Thu, 16 Dec 2004 15:49:36 GMT
remm        2004/12/16 07:49:36

  Modified:    webapps/manager/WEB-INF/classes/org/apache/catalina/manager
                        ManagerServlet.java
  Log:
  - Remove the remove method, and use the undeploy methos instead.
  
  Revision  Changes    Path
  1.25      +2 -56     jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java
  
  Index: ManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ManagerServlet.java	16 Dec 2004 15:39:28 -0000	1.24
  +++ ManagerServlet.java	16 Dec 2004 15:49:36 -0000	1.25
  @@ -32,7 +32,6 @@
   import javax.naming.InitialContext;
   import javax.naming.NamingEnumeration;
   import javax.naming.NamingException;
  -import javax.naming.directory.DirContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.UnavailableException;
  @@ -56,8 +55,6 @@
   import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   import org.apache.commons.modeler.Registry;
  -import org.apache.naming.resources.ProxyDirContext;
  -import org.apache.naming.resources.WARDirContext;
   
   
   /**
  @@ -355,7 +352,7 @@
               reload(writer, path);
           } else if (command.equals("/remove")) {
               // Deprecated
  -            remove(writer, path);
  +            undeploy(writer, path);
           } else if (command.equals("/resources")) {
               resources(writer, type);
           } else if (command.equals("/roles")) {
  @@ -893,15 +890,6 @@
                                  ("managerServlet.noContext", displayPath));
                   return;
               }
  -            DirContext resources = context.getResources();
  -            if (resources instanceof ProxyDirContext) {
  -                resources = ((ProxyDirContext) resources).getDirContext();
  -            }
  -            if (resources instanceof WARDirContext) {
  -                writer.println(sm.getString
  -                               ("managerServlet.noReload", displayPath));
  -                return;
  -            }
               // It isn't possible for the manager to reload itself
               if (context.getPath().equals(this.context.getPath())) {
                   writer.println(sm.getString("managerServlet.noSelf"));
  @@ -912,48 +900,6 @@
                   (sm.getString("managerServlet.reloaded", displayPath));
           } catch (Throwable t) {
               log("ManagerServlet.reload[" + displayPath + "]", t);
  -            writer.println(sm.getString("managerServlet.exception",
  -                                        t.toString()));
  -        }
  -
  -    }
  -
  -
  -    /**
  -     * Remove the web application at the specified context path.
  -     *
  -     * @param writer Writer to render to
  -     * @param path Context path of the application to be removed
  -     * @deprecated Replaced by undeploy
  -     */
  -    protected void remove(PrintWriter writer, String path) {
  -
  -        if (debug >= 1)
  -            log("remove: Removing web application at '" + path + "'");
  -
  -        if ((path == null) || (!path.startsWith("/") && path.equals(""))) {
  -            writer.println(sm.getString("managerServlet.invalidPath", path));
  -            return;
  -        }
  -        String displayPath = path;
  -        if( path.equals("/") )
  -            path = "";
  -
  -        try {
  -            Context context = (Context) host.findChild(path);
  -            if (context == null) {
  -                writer.println(sm.getString("managerServlet.noContext", displayPath));
  -                return;
  -            }
  -            // It isn't possible for the manager to remove itself
  -            if (context.getPath().equals(this.context.getPath())) {
  -                writer.println(sm.getString("managerServlet.noSelf"));
  -                return;
  -            }
  -            host.removeChild(context);
  -            writer.println(sm.getString("managerServlet.undeployed", displayPath));
  -        } catch (Throwable t) {
  -            log("ManagerServlet.remove[" + displayPath + "]", t);
               writer.println(sm.getString("managerServlet.exception",
                                           t.toString()));
           }
  
  
  

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


Mime
View raw message