You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bi...@apache.org on 2003/04/04 08:35:18 UTC

cvs commit: jakarta-tomcat/src/admin/contextAdmin contextRestart.jsp contextsRestart.jsp

billbarker    2003/04/03 22:35:18

  Added:       src/admin/contextAdmin contextRestart.jsp
                        contextsRestart.jsp
  Log:
  Forgot to add these.
  
  Submitted by: Zorro zorro.desbois@wanadoo.fr
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat/src/admin/contextAdmin/contextRestart.jsp
  
  Index: contextRestart.jsp
  ===================================================================
  <html>
  <%-- can't have a session (yet) if restarting this context --%>
  <%@ page session="false" %> 
  <%@ taglib uri="http://jakarta.apache.org/taglibs/tomcat_admin-1.0" 
             prefix="adm" %>
  
  <!--
    Copyright (c) 1999 The Apache Software Foundation.  All rights 
    reserved.
  -->
  
  <head>
  
      <title>Context restart</title>
  </head>
  
  <body bgcolor="white">
  
  <h3>Restarting <%= ( (request.getParameter("restartHost")==null) || 
                       ("".equals( request.getParameter("restartHost") ) ) ) ? 
                        "localhost" : request.getParameter("restartHost") %>:<%= 
  	            ("".equals(request.getParameter("restartContextName"))) ?
                        "ROOT" : request.getParameter("restartContextName") %></h3>
  
  <adm:admin ctxHostParam="restartHost"
             ctxPathParam="restartContextName"
             docBaseParam="restartContextDocBase"
             action="restartContext" />
  
  <a href="contextList.jsp">Return to Context List</a>
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-tomcat/src/admin/contextAdmin/contextsRestart.jsp
  
  Index: contextsRestart.jsp
  ===================================================================
  <html>
  <%@ page import="java.util.Enumeration, org.apache.tomcat.core.Context" %>
  <%@ taglib uri="http://jakarta.apache.org/taglibs/tomcat_admin-1.0" 
             prefix="adm" %>
  <!--
    Copyright (c) 1999 The Apache Software Foundation.  All rights 
    reserved.
  -->
  
  <head>
      <title>Restart Contexts</title>
  </head>
  
  <body bgcolor="white">
  
  
  <h2>Prepare to restart all contexts</h2>
  <adm:admin />
  <%
    Enumeration en=cm.getContexts();
    while( en.hasMoreElements() ) {
      ctx=(Context)en.nextElement(); %>
      <jsp:include page="contextRestart.jsp" flush="true">
        <jsp:param name="restartHost" value="<%= 
  	ctx.getHost() == null ? \"\" : ctx.getHost() %>" />
        <jsp:param name="restartContextName" value="<%= ctx.getPath() %>" />
        <jsp:param name="restartContextDocBase" value="<%= ctx.getDocBase() %>" />
        <jsp:param name="action" value="restartContext" />
     </jsp:include>
  <% } 
  
   System.out.println("TomcatWebAdmin : All contexts restarted ");
  %>
  
  <h1>Contexts restarted </h1>
  
  <a href="contextList.jsp">Return to Context List</a>
  
  </body>
  </html>
  
  
  

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