### GET /deploy Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/ManagerServlet.html Install and start a new web application. ```APIDOC ## GET /deploy ### Description Install and start a new web application. ### Method GET ### Endpoint /deploy ### Parameters #### Query Parameters - **config** (string) - Optional - URL of the context configuration file. - **war** (string) - Optional - URL of the web application archive. - **path** (string) - Optional - Context path for the application. ``` -------------------------------- ### GET /start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/ManagerServlet.html Start a web application. ```APIDOC ## GET /start ### Description Start the web application attached to the specified context path. ### Method GET ### Endpoint /start ### Parameters #### Query Parameters - **path** (string) - Required - The context path of the application to start. ``` -------------------------------- ### Start Virtual Host Source: https://tomcat.apache.org/tomcat-10.1-doc/host-manager-howto.html Use the start command to start a virtual host. ```APIDOC ## POST /host-manager/text/start ### Description Starts a specified virtual host. ### Method POST ### Endpoint /host-manager/text/start ### Parameters #### Query Parameters - **name** (string) - Required - The name of the virtual host to be started. ### Request Example ```json { "example": "curl -u test:test http://localhost:8080/host-manager/text/start?name=www.awesomeserver.com" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the host was started. #### Response Example ```json { "example": "OK - Host www.awesomeserver.com started" } ``` ``` -------------------------------- ### Install First Tomcat Instance Source: https://tomcat.apache.org/tomcat-10.1-doc/windows-service-howto.html Set CATALINA_HOME and CATALINA_BASE environment variables, then install the first instance using 'service.bat install' with a unique service name. ```batch set CATALINA_HOME=c:\tomcat_10 set CATALINA_BASE=c:\tomcat_10\instances\instance1 service.bat install instance1 ``` -------------------------------- ### Start a Virtual Host Source: https://tomcat.apache.org/tomcat-10.1-doc/host-manager-howto.html Use the 'start' command to initiate a virtual host. Requires the 'name' parameter specifying the virtual host to start. ```bash curl -u test:test http://localhost:8080/host-manager/text/start?name=www.awesomeserver.com ``` ```text OK - Host www.awesomeserver.com started ``` -------------------------------- ### start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/group/interceptors/SimpleCoordinator.html Starts up the channel services. ```APIDOC ## start ### Description Starts up the channel. This can be called multiple times for individual services to start. ### Parameters #### Request Body - **svc** (int) - Required - The logical OR value of constants (Channel.DEFAULT, Channel.MBR_RX_SEQ, etc.) ``` -------------------------------- ### start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/StaticMembershipProvider.html Starts the membership provider at the specified readiness level. ```APIDOC ## start ### Description Start the membership provider. ### Method public void ### Parameters #### Request Body - **level** (int) - Required - The readiness level (Channel.DEFAULT, Channel.MBR_RX_SEQ, or Channel.MBR_TX_SEQ) ### Response - **void** - Returns nothing, throws Exception if an error occurs ``` -------------------------------- ### GET /list Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/ManagerServlet.html List the context paths of all currently installed web applications. ```APIDOC ## GET /list ### Description List the context paths of all currently installed web applications for this virtual host. ### Method GET ### Endpoint /list ``` -------------------------------- ### Start Application Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/HTMLManagerServlet.html Starts the web application at the specified context path. ```APIDOC ## POST /start ### Description Start the web application at the specified context path. ### Method POST ### Endpoint /start ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **cn** (ContextName) - Name of the application to be started - **smClient** (StringManager) - StringManager for the client's locale ### Request Example ```json { "cn": "my_app", "smClient": "" } ``` ### Response #### Success Response (200) - **message** (String) - A message indicating the result of the start operation. #### Response Example ```json { "message": "Application started successfully." } ``` ``` -------------------------------- ### start(int level) Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/cloud/KubernetesMembershipProvider.html Starts the membership provider service at the specified readiness level. ```APIDOC ## start(int level) ### Description Starts the membership provider. This method initializes the services based on the provided readiness level. ### Parameters #### Method Parameters - **level** (int) - Required - The readiness level: Channel.DEFAULT (all services), Channel.MBR_RX_SEQ (membership receiver), or Channel.MBR_TX_SEQ (membership broadcaster). ### Response - **void** - Returns nothing upon success. ### Throws - **Exception** - If an error occurs during startup. ``` -------------------------------- ### start Method Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/Channel.html Starts up the channel, optionally for specific services. Can be called multiple times. ```APIDOC ## start Method Starts up the channel. This method can be called multiple times for individual services. ### Signature `void start(int svc) throws ChannelException` ### Parameters * `svc` - `int`: Specifies which services to start. Can be one of the following constants: * `DEFAULT`: Starts all services. * `MBR_RX_SEQ`: Starts the membership receiver. * `MBR_TX_SEQ`: Starts the membership broadcaster. * `SND_TX_SEQ`: Starts the replication transmitter. * `SND_RX_SEQ`: Starts the replication receiver. **Note**: The membership broadcaster must be started after the replication receiver for correct information transmission. ### Throws * `ChannelException`: If a startup error occurs, the service is already started, or another error occurs during startup. ``` -------------------------------- ### start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/startup/HostConfig.html Processes a 'start' event for this Host. ```APIDOC ## start public void start() ### Description Process a "start" event for this Host. ### Method public void ``` -------------------------------- ### start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/coyote/AbstractProtocol.html Starts the protocol handler, enabling it to accept and process connections. ```APIDOC ## start ### Description Starts the protocol handler, enabling it to accept and process connections. ### Method N/A (Method Signature) ### Signature void start() ``` -------------------------------- ### beforeStart Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/startup/HostConfig.html Executes actions before the Host starts. ```APIDOC ## beforeStart public void beforeStart() ### Description Executes actions before the Host starts. ### Method public void ``` -------------------------------- ### getAtSTag Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the start tag for a custom tag. ```APIDOC ## getAtSTag ### Description Gets the start tag for a custom tag. ### Method N/A (Method signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### getLoadOnStartup() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the load-on-startup order for a servlet. This value determines the order in which servlets are initialized when the web application starts. Used by `StandardWrapper`, `Wrapper`, and `ServletDef`. ```APIDOC ## getLoadOnStartup() ### Description Gets the load-on-startup order for a servlet. ### Method GET (implied) ### Endpoint N/A (Method call) ### Parameters None ### Response - **int**: The load-on-startup order. ``` -------------------------------- ### POST /start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/StaticMembershipService.html Starts the membership service. If a membership listener is added, the listener will start to receive membership events. ```APIDOC ## POST /start ### Description Starts the membership service. Level MBR_RX starts listening for members, level MBR_TX starts broadcasting the server. ### Parameters #### Request Body - **level** (int) - Required - The level at which to start the service. ``` -------------------------------- ### Start Host API Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/host/HTMLHostManagerServlet.html Starts the host with the specified name. ```APIDOC ## start ### Description Start the host with the specified name. ### Method protected ### Endpoint start(String name, StringManager smClient) ### Parameters #### Path Parameters - **name** (String) - Required - Host name - **smClient** (StringManager) - Required - StringManager for the client's locale ### Returns output ``` -------------------------------- ### installSmap Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/jasper/compiler/SmapUtil.html Installs the provided SMAP information. ```APIDOC ## installSmap ### Description Installs the provided SMAP information. ### Parameters - **smapInfo** (Map) - Required - The SMAP information to install ### Throws - **IOException** ``` -------------------------------- ### start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/dbcp/dbcp2/DataSourceMXBean.html Starts the data source. This method can throw a `SQLException` if an error occurs during initialization. This method is available since version 2.8.0. ```APIDOC ## start default void start() throws SQLException See `BasicDataSource.start()`. Throws: `SQLException` - if an error occurs initializing the data source. Since: 2.8.0 ``` -------------------------------- ### setupDefaults Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.html Sets up the defaults for a given connection. Description copied from class: InstanceKeyDataSource ```APIDOC ## setupDefaults ### Description Sets up the defaults for a given connection. Specified by: `setupDefaults` in class `InstanceKeyDataSource` ### Method protected void ### Endpoint N/A (Java Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ### Parameters - **con** (Connection) - Required - The target connection. - **userName** (String) - Required - The user name for the connection. ### Throws - `SQLException` - if a database access error occurs or this method is called on a closed connection ``` -------------------------------- ### Start Time Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/StandardContext.html Gets the time this context was started. ```APIDOC ## getStartTime ### Description Gets the time this context was started. ### Method public long getStartTime() ### Returns - **long** - Time (in milliseconds since January 1, 1970, 00:00:00) when this context was started ``` -------------------------------- ### getChannelStartOptions() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Retrieves the start options for the channel. ```APIDOC ## getChannelStartOptions() ### Description Retrieves the start options for the channel. ### Method (Not specified in source) ### Endpoint (Not specified in source) ``` -------------------------------- ### Prepare Build Environment Source: https://tomcat.apache.org/tomcat-10.1-doc/appdev/build.xml.txt Initializes the build directory structure and copies static web content. ```xml ``` -------------------------------- ### TransformationFactory.getInstalledExtensions() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the installed WebSocket extensions. ```APIDOC ## TransformationFactory.getInstalledExtensions() ### Description Get the installed WebSocket extensions. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **List** - A list of installed WebSocket extensions. ``` -------------------------------- ### Create and Check In build.xml Source: https://tomcat.apache.org/tomcat-10.1-doc/appdev/processes.html Create an initial version of the build.xml script for your project. You can base it on a provided sample or write it from scratch. Remember to add it to your repository. ```bash cd {my home directory} cd myapp emacs build.xml <-- if you want a real editor :-) cvs or svn or git ... <-- Add this file to the repository ``` -------------------------------- ### TransformationFactory.getInstalledExtensionNames() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the names of installed WebSocket extensions. ```APIDOC ## TransformationFactory.getInstalledExtensionNames() ### Description Get the names of installed WebSocket extensions. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **List** - A list of names of the installed WebSocket extensions. ``` -------------------------------- ### WsWebSocketContainer.getInstalledExtensions() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the installed extensions for the WebSocket container. ```APIDOC ## WsWebSocketContainer.getInstalledExtensions() ### Description Get the installed extensions for the WebSocket container. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **List** - A list of installed WebSocket extensions. ``` -------------------------------- ### JMXAccessorInvokeTask - Get Session Attribute Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/ant/jmx/JMXAccessorInvokeTask.html Example of how to get a session attribute 'hello' from a specific application context using the jmx:invoke task. ```APIDOC ## POST /jmx/invoke ### Description Invokes an operation on a JMX MBean to retrieve a session attribute. ### Method POST ### Endpoint /jmx/invoke ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the MBean to invoke the operation on. - **operation** (string) - Required - The name of the operation to invoke. - **resultproperty** (string) - Optional - The Ant property name to store the result in. - **arg** (string) - Optional - Arguments for the operation. Can be specified multiple times. ### Request Example ```json { "name": "Catalina:type=Manager,context=/ClusterTest,host=localhost", "operation": "getSessionAttribute", "resultproperty": "hello", "args": [ "${sessionid.0}", "Hello" ] } ``` ### Response #### Success Response (200) - **result** (string) - The result of the operation. #### Response Example ```json { "result": "AttributeValue" } ``` ``` -------------------------------- ### AprLifecycleListener.getInstalledTcnVersion() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the installed Tomcat Native version string, if available. ```APIDOC ## AprLifecycleListener.getInstalledTcnVersion() ### Description Get the installed Tomcat Native version string, if available. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **String** - The installed Tomcat Native version string, or null if not available. ``` -------------------------------- ### JMX Get Command Example Source: https://tomcat.apache.org/tomcat-10.1-doc/manager-howto.html Use the 'get' and 'att' parameters to fetch an MBean attribute's value. The 'key' parameter is optional for CompositeData MBeans. ```http http://webserver/manager/jmxproxy/?get=BEANNAME&att=MYATTRIBUTE&key=MYKEY ``` ```http http://webserver/manager/jmxproxy/?get=java.lang:type=Memory&att=HeapMemoryUsage ``` ```http http://webserver/manager/jmxproxy/ ?get=java.lang:type=Memory&att=HeapMemoryUsage&key=used ``` -------------------------------- ### DNSMembershipProvider.start() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.html Starts the membership provider with a specified readiness level. ```APIDOC ## DNSMembershipProvider.start() ### Description Starts the membership provider. This method is specified by the `MembershipProvider` interface and overrides the `start` method in `CloudMembershipProvider`. ### Method `public void start(int level) throws Exception` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **level** (int) - Required - The readiness level to start the provider. Possible values include: - `Channel.DEFAULT`: Starts all services. - `Channel.MBR_RX_SEQ`: Starts the membership receiver. - `Channel.MBR_TX_SEQ`: Starts the membership broadcaster. ### Request Example N/A ### Response #### Success Response (void) N/A #### Error Response - **Exception**: Thrown if an error occurs during startup. ``` -------------------------------- ### startInternal Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/realm/DataSourceRealm.html Prepares the component for active use. ```APIDOC ## startInternal ### Description Prepare for the beginning of active use of the public methods of this component. ### Errors - **LifecycleException** - Thrown if this component detects a fatal error that prevents this component from being used. ``` -------------------------------- ### AprLifecycleListener.getInstalledOpenSslVersion() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the installed OpenSSL version string (via APR), if available. ```APIDOC ## AprLifecycleListener.getInstalledOpenSslVersion() ### Description Get the installed OpenSSL version string, using APR (Apache Portable Runtime), if available. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **String** - The installed OpenSSL version string via APR, or null if not available. ``` -------------------------------- ### Start Tomcat instance Source: https://tomcat.apache.org/tomcat-10.1-doc/RUNNING.txt Commands to initiate the Tomcat server process. ```batch %CATALINA_HOME%\bin\startup.bat %CATALINA_HOME%\bin\catalina.bat start ``` ```bash $CATALINA_HOME/bin/startup.sh $CATALINA_HOME/bin/catalina.sh start ``` -------------------------------- ### Startup Time Methods Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/StandardContext.html Methods for retrieving the startup time of the context. ```APIDOC ## getStartupTime ### Description Gets the time (in milliseconds) it took to start this context. ### Method GET ### Endpoint /getStartupTime ### Returns long - Time (in milliseconds) it took to start this context. ``` -------------------------------- ### OpenSSLLifecycleListener.getInstalledOpenSslVersion() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Get the installed OpenSSL version string (via FFM), if available. ```APIDOC ## OpenSSLLifecycleListener.getInstalledOpenSslVersion() ### Description Get the installed OpenSSL version string, using FFM (Java's built-in SSL implementation), if available. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **String** - The installed OpenSSL version string via FFM, or null if not available. ``` -------------------------------- ### getTcnVersionWarning Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/AprLifecycleListener.html Gets a warning message if the installed Tomcat Native version is older than recommended. ```APIDOC ## getTcnVersionWarning() ### Description Get a warning message if the installed Tomcat Native version is older than recommended. This performs the same version check used during Tomcat startup. ### Method `public static String getTcnVersionWarning()` ### Returns A warning message if the installed version is outdated, or null if the version is acceptable or APR is not available. ``` -------------------------------- ### GET /container/startStopThreads Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/ContainerBase.html Retrieves the number of threads configured for starting and stopping children associated with the container. ```APIDOC ## GET /container/startStopThreads ### Description Obtain the number of threads available for starting and stopping any children associated with this container. ### Method GET ### Endpoint /container/startStopThreads ### Response #### Success Response (200) - **threads** (int) - The currently configured number of threads used to start/stop children. ``` -------------------------------- ### AbstractProtocol.ConnectionHandler.getProtocol Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the protocol. ```APIDOC ## AbstractProtocol.ConnectionHandler.getProtocol ### Description Gets the protocol. ### Method Not specified (likely a getter method). ### Endpoint Not applicable (Java method). ### Parameters None. ### Response * **String** - The protocol. ``` -------------------------------- ### Build documentation Source: https://tomcat.apache.org/tomcat-10.1-doc/BUILDING.txt Commands to build the documentation web application separately. ```bash cd ${tomcat.source} ant build-docs ``` -------------------------------- ### Start/Stop Thread Configuration Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/Container.html Get or set the number of threads used for starting and stopping children containers in parallel. ```APIDOC ## GET /startStopThreads ### Description Obtain the number of threads available for starting and stopping children. ### Response #### Success Response (200) - **threads** (int) - The currently configured number of threads ## PUT /startStopThreads ### Description Sets the number of threads available for starting and stopping children. ### Parameters #### Request Body - **startStopThreads** (int) - Required - The new number of threads to be used ``` -------------------------------- ### getJspBeginLineNumber() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the start line number in the JSP file of the JSP element responsible for the compilation error. This method is part of the JavacErrorDetail class. ```APIDOC ## getJspBeginLineNumber() ### Description Gets the start line number (in the JSP file) of the JSP element responsible for the compilation error. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response - **int** (type) - The start line number. ``` -------------------------------- ### Typical ServletFileUpload Usage Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/util/http/fileupload/servlet/package-summary.html Demonstrates how to initialize DiskFileItemFactory and ServletFileUpload, and parse an incoming request. Configure the factory and uploader as needed. ```java DiskFileItemFactory factory = new DiskFileItemFactory(); // Configure the factory here, if desired. ServletFileUpload upload = new ServletFileUpload(factory); // Configure the uploader here, if desired. List fileItems = upload.parseRequest(request); ``` -------------------------------- ### resourcesStart Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/StandardContext.html Allocate resources, including proxy. ```APIDOC ## resourcesStart ### Description Allocate resources, including proxy. ### Method public void resourcesStart() throws LifecycleException ### Throws - `LifecycleException` - if a start error occurs ``` -------------------------------- ### Get CGI Command String Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/servlets/CGIServlet.CGIEnvironment.html Retrieves the derived command string used to execute the CGI script. This is part of the environment setup for CGI execution. ```java protected String getCommand() ``` -------------------------------- ### getDefaultHost Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the default host. ```APIDOC ## getDefaultHost ### Description Gets the default host. ### Method Method ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response #### Success Response - **host** (string) - The default host. ``` -------------------------------- ### Context Configuration XML Source: https://tomcat.apache.org/tomcat-10.1-doc/manager-howto.html Example of a Context configuration XML file used for deployment. ```xml ``` -------------------------------- ### ServletContext Interface Source: https://tomcat.apache.org/tomcat-10.1-doc/servletapi/allclasses-index.html Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. ```APIDOC ## ServletContext Interface ### Description Represents the web application environment. Servlets use this interface to communicate with the servlet container, access application-level resources, and manage application state. ### Key Methods - `getRealPath(String path)`: Gets the real path for a given virtual path. - `getResourceAsStream(String path)`: Retrieves an `InputStream` for a resource. - `setAttribute(String name, Object o)` / `getAttribute(String name)`: Manages application-scoped attributes. - `getInitParameter(String name)`: Retrieves context initialization parameters. - `addServlet(String servletName, Class servletClass)`: Dynamically adds a Servlet. ``` -------------------------------- ### JMXAccessorCondition Definition and Usage Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/ant/jmx/JMXAccessorCondition.html Defines how to use the JMXAccessorCondition within Ant build scripts to perform conditional checks based on JMX attributes. It includes setup instructions and a usage example. ```APIDOC ## JMXAccessorCondition ### Description The `JMXAccessorCondition` is an Ant task that allows you to evaluate conditions based on JMX attributes of a running Java application. It can be used within Ant's `waitfor` task to pause build execution until certain JMX conditions are met. ### Method This is an Ant task, not a direct HTTP method. ### Endpoint N/A (Ant task) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```xml ``` ### Response N/A (Ant task execution results in build success or failure) ### Error Handling - The `waitfor` task can set a `timeoutproperty` if the conditions are not met within `maxwait`. - The example shows a `fail` task to stop the build if `server.timeout` is set. ### Allowed Operations Allowed operations between JMX attribute and reference value: - `==` equals - `!=` not equals - `>` greater than (`>`) - `>=` greater than or equals (`>=`) - `<` lesser than (`<`) - `<=` lesser than or equals (`<=`) **NOTE**: For numeric expressions, the type must be set (`long` or `double`) and XML entities should be used for operations. ``` -------------------------------- ### Deploy using XML Configuration (Windows) Source: https://tomcat.apache.org/tomcat-10.1-doc/html-manager-howto.html Install a web application using an XML configuration file on Windows. The context path is derived from the XML. ```properties XML Configuration file URL: file:C:/path/to/context.xml ``` -------------------------------- ### Tomcat Manager Ant Build File Example Source: https://tomcat.apache.org/tomcat-10.1-doc/manager-howto.html This build.xml file configures Ant tasks to interact with the Tomcat Manager application for deploying, reloading, and undeploying web applications. Ensure Ant is installed and Tomcat users have the 'manager-script' role. ```xml ``` -------------------------------- ### RequestInfo.getProtocol Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the protocol information. ```APIDOC ## RequestInfo.getProtocol ### Description Gets the protocol information. ### Method Not specified (likely a getter method). ### Endpoint Not applicable (Java method). ### Parameters None. ### Response * **String** - The protocol information. ``` -------------------------------- ### getAppName Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the application name. ```APIDOC ## getAppName ### Description Gets the application name. ### Method N/A (Method signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### BackgroundProcessManager.getInstance() Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets an instance of BackgroundProcessManager. ```APIDOC ## BackgroundProcessManager.getInstance() ### Description Gets an instance of `BackgroundProcessManager`. ### Method N/A (Method Signature) ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response - **BackgroundProcessManager** - An instance of BackgroundProcessManager. ``` -------------------------------- ### Deploy using XML and WAR (Unix) Source: https://tomcat.apache.org/tomcat-10.1-doc/html-manager-howto.html Install a web application using an XML configuration file and a WAR file on Unix. Both the XML configuration and the WAR file location are specified. ```properties XML Configuration file URL: file:/path/to/context.xml WAR or Directory URL: jar:file:/path/to/bar.war!/ ``` -------------------------------- ### Install Web Application Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/ha/deploy/FarmWarDeployer.html Installs a new web application archive into the local container and propagates the installation to other cluster members. ```APIDOC ## install(String contextName, File webapp) ### Description Installs a new web application, whose web application archive is at the specified URL, into this container and all the other members of the cluster with the specified context name. ### Parameters #### Path Parameters - **contextName** (String) - Required - The context name to which this application should be installed (must be unique). - **webapp** (File) - Required - A WAR file or unpacked directory structure containing the web application to be installed. ### Throws - **IllegalArgumentException** - if the specified context name is malformed - **IllegalStateException** - if the specified context name is already deployed - **IOException** - if an input/output error was encountered during installation ``` -------------------------------- ### Configure Channel Start Options Source: https://tomcat.apache.org/tomcat-10.1-doc/config/cluster.html Defines the start and stop flags for the Channel object. The default value starts all channel services. ```java Channel.DEFAULT = Channel.SND_RX_SEQ (1) | Channel.SND_TX_SEQ (2) | Channel.MBR_RX_SEQ (4) | Channel.MBR_TX_SEQ (8); ``` -------------------------------- ### POST /host/start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/manager/host/HostManagerServlet.html Starts the host with the specified name. ```APIDOC ## POST /host/start ### Description Start the host with the specified name. ### Parameters #### Request Body - **writer** (PrintWriter) - Required - Writer to render to - **name** (String) - Required - Host name - **smClient** (StringManager) - Required - StringManager for the client's locale ``` -------------------------------- ### Create and Check In web.xml Source: https://tomcat.apache.org/tomcat-10.1-doc/appdev/processes.html Create the initial version of the web application deployment descriptor (web.xml). This file can be based on a sample or coded from scratch. Add it to your source code control repository. ```bash cd {my home directory} cd myapp/web/WEB-INF emacs web.xml cvs or svn or git ... <-- Add this file to the repository ``` -------------------------------- ### Bootstrap Main Entry Point Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/startup/Bootstrap.html The main method used to start Tomcat via scripts. ```APIDOC ## Bootstrap Main Method API ### Description This is the main method and entry point for starting Tomcat using the provided scripts. ### Method #### `main(String[] args)` - **Parameters:** - `args` (String[]) - Command line arguments to be processed ``` -------------------------------- ### loadOnStartup Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/core/StandardContext.html Load and initialize all servlets marked "load on startup" in the web application deployment descriptor. ```APIDOC ## loadOnStartup ### Description Load and initialize all servlets marked "load on startup" in the web application deployment descriptor. ### Method public boolean loadOnStartup(Container[] children) ### Parameters #### Path Parameters - **children** (Container[]) - Description: Array of wrappers for all currently defined servlets (including those not declared load on startup) ### Returns `true` if load on startup was considered successful ``` -------------------------------- ### ChannelCoordinator - start Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/group/ChannelCoordinator.html Starts up the channel services. This method can be called multiple times for individual services. The svc parameter determines which services to start. ```APIDOC ## POST /ChannelCoordinator/start ### Description Starts up the channel. This can be called multiple times for individual services to start. ### Method POST ### Endpoint /ChannelCoordinator/start ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **svc** (int) - Required - The service to start. Can be one of: - Channel.DEFAULT (starts all services) - Channel.MBR_RX_SEQ (starts the membership receiver) - Channel.MBR_TX_SEQ (starts the membership broadcaster) - Channel.SND_TX_SEQ (starts the replication transmitter) - Channel.SND_RX_SEQ (starts the replication receiver) ### Request Example ```json { "svc": 1 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates success. #### Response Example ```json { "status": "Channel service started successfully" } ``` #### Error Response (500) - **error** (string) - Description of the error. #### Error Example ```json { "error": "Startup error: Service already started" } ``` ``` -------------------------------- ### JNDIRealm.getProtocol Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the protocol used by the JNDIRealm. ```APIDOC ## JNDIRealm.getProtocol ### Description Gets the protocol used by the JNDIRealm. ### Method Not specified (likely a getter method). ### Endpoint Not applicable (Java method). ### Parameters None. ### Response * **String** - The protocol string. ``` -------------------------------- ### Default Connection Setup Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.html Sets up default properties for a given database connection. ```APIDOC ## Default Connection Setup ### Description Sets up default properties for a given database connection. ### Method - `protected void setupDefaults(Connection con, String userName)` Sets up the defaults for a given connection. ``` -------------------------------- ### Start Channel Services Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/ChannelInterceptor.html Starts up the channel. This can be called multiple times for individual services to start. The `svc` parameter can be the logical or value of any constants. ```java void start(int svc) throws ChannelException; ``` -------------------------------- ### subSequence(int start, int end) Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/util/buf/CharChunk.html Returns a subsequence of this sequence. The subsequence starts at the specified start index and extends to the character at index end - 1. ```APIDOC ## subSequence(int start, int end) ### Description Returns a subsequence of this sequence. The subsequence starts at the specified start index and extends to the character at index end - 1. ### Method public CharSequence subSequence ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```json { "example": "No request body" } ``` ### Response #### Success Response (200) - **subsequence** (CharSequence) - The specified subsequence. #### Response Example ```json { "example": "CharSequence subsequence" } ``` ``` -------------------------------- ### Initialization and Configuration Methods Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/servlets/DefaultServlet.html Methods for initializing the servlet and checking configuration options like listings and range requests. ```APIDOC ## init ### Description A convenience method which can be overridden so that there's no need to call `super.init(config)`. ### Method void ### Endpoint N/A (Internal method) ## isListings ### Description Checks if directory listings are enabled. ### Method protected boolean ### Endpoint N/A (Internal method) ## isRangeRequestsSupported ### Description Checks if range request is supported by server. ### Method protected boolean ### Endpoint N/A (Internal method) ## isReadOnly ### Description Checks if the resource is read-only. ### Method protected boolean ### Endpoint N/A (Internal method) ``` -------------------------------- ### POST /pool/create Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/tomcat/jdbc/pool/DataSourceProxy.html Initializes and sets up the connection pool. ```APIDOC ## POST /pool/create ### Description Sets up the connection pool by creating a pooling driver. ### Method POST ### Endpoint /pool/create ### Response #### Success Response (200) - **ConnectionPool** (Object) - The initialized connection pool instance ``` -------------------------------- ### Service Start Time Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/McastServiceImpl.html Retrieves the service start time. ```APIDOC ## public long getServiceStartTime() ### Description Returns the time when the service was started. ### Method public long ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **long** - The timestamp of the service start time. #### Response Example ```json { "example": "1678886400000" } ``` ``` -------------------------------- ### JSSESupport.getProtocol Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the protocol supported by JSSESupport. ```APIDOC ## JSSESupport.getProtocol ### Description Gets the protocol supported by JSSESupport. ### Method Not specified (likely a getter method). ### Endpoint Not applicable (Java method). ### Parameters None. ### Response * **String** - The protocol string. ``` -------------------------------- ### Welcome File Management Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/mapper/Mapper.html Methods for managing welcome files for a given context. ```APIDOC ## Welcome File Management ### addWelcomeFile ```java public void addWelcomeFile(String hostName, String contextPath, String version, String welcomeFile) ``` Adds a welcome file to the given context. **Parameters:** - `hostName` (String) - The host where the given context can be found. - `contextPath` (String) - The path of the given context. - `version` (String) - The version of the given context. - `welcomeFile` (String) - The welcome file to add. ``` ```APIDOC ### removeWelcomeFile ```java public void removeWelcomeFile(String hostName, String contextPath, String version, String welcomeFile) ``` Removes a welcome file from the given context. **Parameters:** - `hostName` (String) - The host where the given context can be found. - `contextPath` (String) - The path of the given context. - `version` (String) - The version of the given context. - `welcomeFile` (String) - The welcome file to remove. ``` ```APIDOC ### clearWelcomeFiles ```java public void clearWelcomeFiles(String hostName, String contextPath, String version) ``` Clears all welcome files for the given context. **Parameters:** - `hostName` (String) - The host where the context to be cleared can be found. - `contextPath` (String) - The path of the context to be cleared. - `version` (String) - The version of the context to be cleared. ``` -------------------------------- ### Start Membership Provider Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/tribes/membership/StaticMembershipProvider.html Starts the membership provider at the specified level. ```APIDOC ## void start(int level) ### Description Start the membership provider. ### Parameters #### Request Body - **level** (int) - Required - The start level for the provider. ``` -------------------------------- ### org.apache.catalina.startup Package Overview Source: https://tomcat.apache.org/tomcat-10.1-doc/api/org/apache/catalina/startup/package-summary.html This section lists the key classes and interfaces within the org.apache.catalina.startup package and their primary functions related to Catalina's startup and configuration. ```APIDOC ## Package org.apache.catalina.startup ### Description Provides classes related to the startup process of Apache Tomcat (Catalina). ### Classes and Interfaces #### Bootstrap **Description**: Bootstrap loader for Catalina. #### Catalina **Description**: Startup/Shutdown shell program for Catalina. #### Catalina.ServerXml **Description**: Represents the server.xml configuration for Catalina. #### CatalinaBaseConfigurationSource **Description**: Configuration source for Catalina base. #### CatalinaProperties **Description**: Utility class to read the bootstrap Catalina configuration. #### CertificateCreateRule **Description**: Rule implementation that creates an SSLHostConfigCertificate. #### ClassLoaderFactory **Description**: Utility class for building class loaders for Catalina. #### ClassLoaderFactory.Repository **Description**: Represents a repository for class loaders. #### ClassLoaderFactory.RepositoryType **Description**: Type of a class loader repository. #### ConnectorCreateRule **Description**: Rule implementation that creates a connector. #### Constants **Description**: String constants for the startup package. #### ContextConfig **Description**: Startup event listener for a **Context** that configures the properties of that Context, and the associated defined servlets. #### ContextConfig.ContextXml **Description**: Represents the context.xml configuration for a Context. #### ContextConfig.DefaultWebXmlCacheEntry **Description**: Cache entry for default web.xml. #### ContextConfig.JavaClassCacheEntry **Description**: Cache entry for Java classes. #### ContextRuleSet **Description**: **RuleSet** for processing the contents of a Context definition element. #### CopyParentClassLoaderRule **Description**: Rule that copies the `parentClassLoader` property from the next-to-top item on the stack (which must be a `Container`) to the top item on the stack (which must also be a `Container`). #### CredentialHandlerRuleSet **Description**: **RuleSet** for processing the contents of a CredentialHandler definition element. #### EngineConfig **Description**: Startup event listener for an **Engine** that configures the properties of that Engine, and the associated defined contexts. #### EngineRuleSet **Description**: **RuleSet** for processing the contents of an Engine definition element. #### ExpandWar **Description**: Expand out a WAR in a Host's appBase. #### FailedContext **Description**: An implementation of `Context` that is used as a place-holder for deployed applications when their deployment fails and a Context instance (usually `StandardContext` but may be any Context implementation) cannot be created. #### HomesUserDatabase **Description**: Concrete implementation of the `UserDatabase` interface considers all directories in a directory whose pathname is specified to our constructor to be "home" directories for those users. #### HostConfig **Description**: Startup event listener for a **Host** that configures the properties of that Host, and the associated defined contexts. #### HostConfig.DeployedApplication **Description**: This class represents the state of a deployed application, as well as the monitored resources. #### HostRuleSet **Description**: **RuleSet** for processing the contents of a Host definition element. #### LifecycleListenerRule **Description**: Rule that creates a new `LifecycleListener` and associates it with the top object on the stack which must implement `Container`. #### ListenerCreateRule **Description**: Rule implementation that creates a server listener. #### ListenerCreateRule.OptionalListener **Description**: Represents an optional listener. #### NamingRuleSet **Description**: **RuleSet** for processing the JNDI Enterprise Naming Context resource declaration elements. #### PasswdUserDatabase **Description**: Concrete implementation of the `UserDatabase` interface that processes the `/etc/passwd` file on a Unix system. #### RealmRuleSet **Description**: **RuleSet** for processing the contents of a Realm definition element. #### SafeForkJoinWorkerThreadFactory **Description**: Provides a `ForkJoinPool.ForkJoinWorkerThreadFactory` that provides `ForkJoinWorkerThread`s that won't trigger memory leaks due to retained references to web application class loaders. #### SetNextNamingRule **Description**: Rule implementation that calls a method on the (top-1) (parent) object, passing the top object (child) as an argument. #### Tomcat **Description**: Minimal tomcat starter for embedding/unit tests. #### Tomcat.DefaultWebXmlListener **Description**: Fix reload - required if reloading and using programmatic configuration. #### Tomcat.ExistingStandardWrapper **Description**: Helper class for wrapping existing servlets. #### Tomcat.FixContextListener **Description**: Fix startup sequence - required if you don't use web.xml. #### Tool **Description**: General purpose wrapper for command line tools that should execute in an environment with the common class loader environment set up by Catalina. #### UserConfig **Description**: Startup event listener for a **Host** that configures Contexts (web applications) for all defined "users" who have a web application in a directory with the specified name in their home directories. #### UserDatabase **Description**: Abstraction of the set of users defined by the operating system on the current server platform. #### VersionLoggerListener **Description**: Logs version information on startup. #### WebAnnotationSet **Description**: **AnnotationSet** for processing the annotations of the web application classes (`/WEB-INF/classes` and `/WEB-INF/lib`). #### WebappServiceLoader **Description**: A variation of Java's JAR ServiceLoader that respects exclusion rules for web applications. ``` -------------------------------- ### UpgradeToken.getProtocol Source: https://tomcat.apache.org/tomcat-10.1-doc/api/index-all.html Gets the protocol associated with the UpgradeToken. ```APIDOC ## UpgradeToken.getProtocol ### Description Gets the protocol associated with the UpgradeToken. ### Method Not specified (likely a getter method). ### Endpoint Not applicable (Java method). ### Parameters None. ### Response * **String** - The protocol string. ```