Class HTMLHostManagerServlet

  • All Implemented Interfaces:
    Servlet, ServletConfig, java.io.Serializable, ContainerServlet

    public final class HTMLHostManagerServlet
    extends HostManagerServlet
    Servlet that enables remote management of the virtual hosts deployed on the server. Normally, this functionality will be protected by a security constraint in the web application deployment descriptor. However, this requirement can be relaxed during testing.

    The difference between the HostManagerServlet and this Servlet is that this Servlet prints out an HTML interface which makes it easier to administrate.

    However if you use a software that parses the output of HostManagerServlet you won't be able to upgrade to this Servlet since the output are not in the same format as from HostManagerServlet

    Author:
    Bip Thelin, Malcolm Edgar, Glenn L. Nielsen, Peter Rossbach
    See Also:
    ManagerServlet, Serialized Form
    • Constructor Detail

      • HTMLHostManagerServlet

        public HTMLHostManagerServlet()
    • Method Detail

      • add

        protected java.lang.String add​(HttpServletRequest request,
                                       java.lang.String name,
                                       StringManager smClient)
        Add a host using the specified parameters.
        Parameters:
        request - The Servlet request
        name - Host name
        smClient - StringManager for the client's locale
        Returns:
        output
      • remove

        protected java.lang.String remove​(java.lang.String name,
                                          StringManager smClient)
        Remove the specified host.
        Parameters:
        name - Host name
        smClient - StringManager for the client's locale
        Returns:
        output
      • start

        protected java.lang.String start​(java.lang.String name,
                                         StringManager smClient)
        Start the host with the specified name.
        Parameters:
        name - Host name
        smClient - StringManager for the client's locale
        Returns:
        output
      • stop

        protected java.lang.String stop​(java.lang.String name,
                                        StringManager smClient)
        Stop the host with the specified name.
        Parameters:
        name - Host name
        smClient - StringManager for the client's locale
        Returns:
        output
      • persist

        protected java.lang.String persist​(StringManager smClient)
        Persist the current configuration to server.xml.
        Parameters:
        smClient - i18n resources localized for the client
        Returns:
        output
      • list

        public void list​(HttpServletRequest request,
                         HttpServletResponse response,
                         java.lang.String message,
                         StringManager smClient)
                  throws java.io.IOException
        Render an HTML list of the currently active Contexts in our virtual host, and memory and server status information.
        Parameters:
        request - The request
        response - The response
        message - a message to display
        smClient - StringManager for the client's locale
        Throws:
        java.io.IOException - An IO error occurred