Class Catalina

java.lang.Object
org.apache.catalina.startup.Catalina

public class Catalina extends 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.
Author:
Craig R. McClanahan, Remy Maucherat
  • Field Details Link icon

    • sm Link icon

      protected static final StringManager sm
      The string manager for this package.
    • SERVER_XML Link icon

      public static final String SERVER_XML
      See Also:
    • await Link icon

      protected boolean await
      Use await.
    • configFile Link icon

      protected String configFile
      Pathname to the server configuration file.
    • parentClassLoader Link icon

      protected ClassLoader parentClassLoader
      The shared extensions class loader for this server.
    • server Link icon

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

      protected boolean useShutdownHook
      Use shutdown hook flag.
    • shutdownHook Link icon

      protected Thread shutdownHook
      Shutdown hook.
    • useNaming Link icon

      protected boolean useNaming
      Is naming enabled ?
    • loaded Link icon

      protected boolean loaded
      Prevent duplicate loads.
    • generateCode Link icon

      protected boolean generateCode
      Generate Tomcat embedded code from configuration files.
    • generatedCodeLocation Link icon

      protected File generatedCodeLocation
      Location of generated sources.
    • generatedCodeLocationParameter Link icon

      protected String generatedCodeLocationParameter
      Value of the argument.
    • generatedCodePackage Link icon

      protected String generatedCodePackage
      Top package name for generated source.
    • useGeneratedCode Link icon

      protected boolean useGeneratedCode
      Use generated code as a replacement for configuration files.
  • Constructor Details Link icon

    • Catalina Link icon

      public Catalina()
  • Method Details Link icon

    • setConfigFile Link icon

      public void setConfigFile(String file)
    • getConfigFile Link icon

      public String getConfigFile()
    • setUseShutdownHook Link icon

      public void setUseShutdownHook(boolean useShutdownHook)
    • getUseShutdownHook Link icon

      public boolean getUseShutdownHook()
    • getGenerateCode Link icon

      public boolean getGenerateCode()
    • setGenerateCode Link icon

      public void setGenerateCode(boolean generateCode)
    • getUseGeneratedCode Link icon

      public boolean getUseGeneratedCode()
    • setUseGeneratedCode Link icon

      public void setUseGeneratedCode(boolean useGeneratedCode)
    • getGeneratedCodeLocation Link icon

      public File getGeneratedCodeLocation()
    • setGeneratedCodeLocation Link icon

      public void setGeneratedCodeLocation(File generatedCodeLocation)
    • getGeneratedCodePackage Link icon

      public String getGeneratedCodePackage()
    • setGeneratedCodePackage Link icon

      public void setGeneratedCodePackage(String generatedCodePackage)
    • setParentClassLoader Link icon

      public void setParentClassLoader(ClassLoader parentClassLoader)
      Set the shared extensions class loader.
      Parameters:
      parentClassLoader - The shared extensions class loader.
    • getParentClassLoader Link icon

      public ClassLoader getParentClassLoader()
    • setServer Link icon

      public void setServer(Server server)
    • getServer Link icon

      public Server getServer()
    • isUseNaming Link icon

      public boolean isUseNaming()
      Returns:
      true if naming is enabled.
    • setUseNaming Link icon

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

      public void setAwait(boolean b)
    • isAwait Link icon

      public boolean isAwait()
    • arguments Link icon

      protected boolean arguments(String[] args)
      Process the specified command line arguments.
      Parameters:
      args - Command line arguments to process
      Returns:
      true if we should continue processing
    • configFile Link icon

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

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

      protected Digester createStopDigester()
      Create and configure the Digester we will be using for shutdown.
      Returns:
      the digester to process the stop operation
    • parseServerXml Link icon

      protected void parseServerXml(boolean start)
    • stopServer Link icon

      public void stopServer()
    • stopServer Link icon

      public void stopServer(String[] arguments)
    • load Link icon

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

      public void load(String[] args)
    • start Link icon

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

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

      public void await()
      Await and shutdown.
    • usage Link icon

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

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

      protected void initStreams()
    • initNaming Link icon

      protected void initNaming()
    • setSecurityProtection Link icon

      protected void setSecurityProtection()
      Set the security package access/protection.
    • generateLoader Link icon

      protected void generateLoader()
    • generateClassHeader Link icon

      protected void generateClassHeader(Digester digester, boolean start)
    • generateClassFooter Link icon

      protected void generateClassFooter(Digester digester)