Class Catalina

  • public class Catalina
    extends java.lang.Object
    Startup/Shutdown shell program for Catalina. The following command line options are recognized:
    • -config {pathname} - Set the pathname of the configuration file to be processed. If a relative path is specified, it will be interpreted as relative to the directory pathname specified by the "catalina.base" system property. [conf/server.xml]
    • -help - Display usage information.
    • -nonaming - Disable naming support.
    • configtest - Try to test the config
    • start - Start an instance of Catalina.
    • stop - Stop the currently running instance of Catalina.
    Craig R. McClanahan, Remy Maucherat
    • Field Detail

      • sm

        protected static final StringManager sm
        The string manager for this package.
      • await

        protected boolean await
        Use await.
      • configFile

        protected java.lang.String configFile
        Pathname to the server configuration file.
      • parentClassLoader

        protected java.lang.ClassLoader parentClassLoader
        The shared extensions class loader for this server.
      • server

        protected Server server
        The server component we are starting or stopping.
      • useShutdownHook

        protected boolean useShutdownHook
        Use shutdown hook flag.
      • shutdownHook

        protected java.lang.Thread shutdownHook
        Shutdown hook.
      • useNaming

        protected boolean useNaming
        Is naming enabled ?
      • loaded

        protected boolean loaded
        Prevent duplicate loads.
    • Constructor Detail

      • Catalina

        public Catalina()
    • Method Detail

      • setConfigFile

        public void setConfigFile​(java.lang.String file)
      • getConfigFile

        public java.lang.String getConfigFile()
      • setUseShutdownHook

        public void setUseShutdownHook​(boolean useShutdownHook)
      • getUseShutdownHook

        public boolean getUseShutdownHook()
      • setParentClassLoader

        public void setParentClassLoader​(java.lang.ClassLoader parentClassLoader)
        Set the shared extensions class loader.
        parentClassLoader - The shared extensions class loader.
      • getParentClassLoader

        public java.lang.ClassLoader getParentClassLoader()
      • setServer

        public void setServer​(Server server)
      • getServer

        public Server getServer()
      • isUseNaming

        public boolean isUseNaming()
        true if naming is enabled.
      • setUseNaming

        public void setUseNaming​(boolean useNaming)
        Enables or disables naming support.
        useNaming - The new use naming value
      • setAwait

        public void setAwait​(boolean b)
      • isAwait

        public boolean isAwait()
      • arguments

        protected boolean arguments​(java.lang.String[] args)
        Process the specified command line arguments.
        args - Command line arguments to process
        true if we should continue processing
      • configFile

        protected configFile()
        Return a File object representing our configuration file.
        the main configuration file
      • createStartDigester

        protected Digester createStartDigester()
        Create and configure the Digester we will be using for startup.
        the main digester to parse server.xml
      • createStopDigester

        protected Digester createStopDigester()
        Create and configure the Digester we will be using for shutdown.
        the digester to process the stop operation
      • stopServer

        public void stopServer()
      • stopServer

        public void stopServer​(java.lang.String[] arguments)
      • load

        public void load()
        Start a new server instance.
      • load

        public void load​(java.lang.String[] args)
      • start

        public void start()
        Start a new server instance.
      • stop

        public void stop()
        Stop an existing server instance.
      • await

        public void await()
        Await and shutdown.
      • usage

        protected void usage()
        Print usage information for this application.
      • initDirs

        protected void initDirs()
        unused. Will be removed in Tomcat 10 onwards.
      • initStreams

        protected void initStreams()
      • initNaming

        protected void initNaming()
      • setSecurityProtection

        protected void setSecurityProtection()
        Set the security package access/protection.