craigmcc    02/02/26 21:40:57

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        LocalStrings.properties ManagerServlet.java
               webapps/admin banner.jsp
               webapps/admin/WEB-INF/classes/org/apache/webapp/admin
                        ApplicationResources_en.properties
               webapps/tomcat-docs manager-howto.xml
  Log:
  Since a "/reload" command has no effect on an application that is loaded
  directly from a WAR file, report it as an error instead of pretending to
  perform the reload.
  
  Revision  Changes    Path
  1.12      +1 -0      
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- LocalStrings.properties   12 Feb 2002 22:14:02 -0000      1.11
  +++ LocalStrings.properties   27 Feb 2002 05:40:57 -0000      1.12
  @@ -25,6 +25,7 @@
   managerServlet.noDirectory=FAIL - Non-directory document base for path {0}
   managerServlet.noDocBase=FAIL - Cannot remove document base for path {0}
   managerServlet.noPath=FAIL - No context path was specified
  +managerServlet.noReload=FAIL - Reload not supported on WAR deployed at path {0}
   managerServlet.noRename=FAIL - Cannot deploy uploaded WAR for path {0}
   managerServlet.noRole=FAIL - User does not possess role {0}
   managerServlet.noWrapper=Container has not called setWrapper() for this servlet
  
  
  
  1.13      +15 -4     
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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ManagerServlet.java       12 Feb 2002 22:14:02 -0000      1.12
  +++ ManagerServlet.java       27 Feb 2002 05:40:57 -0000      1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.12 2002/02/12 22:14:02 craigmcc Exp $
  - * $Revision: 1.12 $
  - * $Date: 2002/02/12 22:14:02 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/ManagerServlet.java,v
 1.13 2002/02/27 05:40:57 craigmcc Exp $
  + * $Revision: 1.13 $
  + * $Date: 2002/02/27 05:40:57 $
    *
    * ====================================================================
    *
  @@ -75,6 +75,7 @@
   import java.util.Enumeration;
   import java.util.jar.JarEntry;
   import java.util.jar.JarFile;
  +import javax.naming.directory.DirContext;
   import javax.servlet.ServletException;
   import javax.servlet.ServletInputStream;
   import javax.servlet.UnavailableException;
  @@ -90,6 +91,8 @@
   import org.apache.catalina.Session;
   import org.apache.catalina.Wrapper;
   import org.apache.catalina.util.StringManager;
  +import org.apache.naming.resources.ProxyDirContext;
  +import org.apache.naming.resources.WARDirContext;
   
   
   /**
  @@ -179,7 +182,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.12 $ $Date: 2002/02/12 22:14:02 $
  + * @version $Revision: 1.13 $ $Date: 2002/02/27 05:40:57 $
    */
   
   public class ManagerServlet
  @@ -741,6 +744,14 @@
               if (context == null) {
                   writer.println(sm.getString("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;
               }
               context.reload();
               writer.println(sm.getString("managerServlet.reloaded", displayPath));
  
  
  
  1.3       +3 -7      jakarta-tomcat-4.0/webapps/admin/banner.jsp
  
  Index: banner.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/admin/banner.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- banner.jsp        13 Nov 2001 01:00:03 -0000      1.2
  +++ banner.jsp        27 Feb 2002 05:40:57 -0000      1.3
  @@ -15,16 +15,14 @@
   
   <body bgcolor="white">
   
  -<center>
  -
  -<h2><bean:message key="index.success"/></h2>
  +<h2 align="center"><bean:message key="index.success"/></h2>
   <p>
  -<h2>
  +<h3 align="center">
     <bean:message key="index.logout"/>
     <html:link page="/logOut.do" target="_top">
       <bean:message key="index.here"/>
     </html:link>
  -</h2>
  +</h3>
   
   <!-- Select language -->
   
  @@ -52,8 +50,6 @@
     </table>
   </html:form>
   -->
  -
  -</center>
   
   </body>
   
  
  
  
  1.29      +2 -2      
jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties
  
  Index: ApplicationResources_en.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ApplicationResources_en.properties        15 Feb 2002 21:04:37 -0000      1.28
  +++ ApplicationResources_en.properties        27 Feb 2002 05:40:57 -0000      1.29
  @@ -1,4 +1,4 @@
  -application.title=Tomcat Server Configuration
  +application.title=Tomcat Server Administration
   errors.header=<h2><font color="red">Validation Errors</font></h2>You must correct 
the following errors before proceeding:<ul>
   errors.footer=</ul><hr>
   error.login=<li>Invalid username or password</li>
  @@ -11,7 +11,7 @@
   button.cancel=Cancel
   login.enter=Enter a username and password to start a new session
   login.changeLanguage=Change the language
  -index.success=Login successful!
  +index.success=Tomcat Server Administration Application
   index.logout=To end this session, click
   index.here=here
   error.login=Invalid username or password
  
  
  
  1.10      +9 -0      jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml
  
  Index: manager-howto.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/manager-howto.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- manager-howto.xml 14 Feb 2002 07:06:35 -0000      1.9
  +++ manager-howto.xml 27 Feb 2002 05:40:57 -0000      1.10
  @@ -378,6 +378,15 @@
       <blockquote>
       The <code>path</code> parameter is required.
       </blockquote></li>
  +<li><em>Reload note supported on WAR deployed at path /foo</em>
  +    <blockquote>
  +    Currently, application reloading (to pick up changes to the classes or
  +    <code>web.xml</code> file) is not supported when a web application is
  +    installed directly from a WAR file.  It only works when the web application
  +    is installed from an unpacked directory.  If you are using a WAR file,
  +    you should <code>remove</code> and then <code>install</code> the
  +    application again to pick up your changes.
  +    </blockquote></li>
   </ul>
   
   </subsection>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to