public interface TomcatContainer
| Modifier and Type | Method and Description |
|---|---|
void |
addContextResource(org.apache.catalina.Context context,
List<ApplicationResource> resourceList,
boolean contextBound)
Adds the context resource.
|
void |
addContextResourceLink(org.apache.catalina.Context context,
List<ApplicationResource> resourceList,
boolean contextBound)
Adds the context resource link.
|
void |
bindToContext(org.apache.catalina.Context context)
Binds a naming context to the current thread's classloader.
|
boolean |
canBoundTo(String binding)
Indicates whether this adapter can bind to the container.
|
void |
discardWorkDir(org.apache.catalina.Context context)
Deletes the "work" directory of the given context.
|
List<org.apache.catalina.connector.Connector> |
findConnectors()
Find connectors.
|
org.apache.catalina.Context |
findContext(String name)
Finds a context based on its path.
|
List<org.apache.catalina.Context> |
findContexts()
Find contexts.
|
String |
formatContextFilename(String contextName)
Formats a context name so that it can be used as a step for the context descriptor .xml or
deployed .war file.
|
String |
formatContextName(String name)
Formats a context name to a path that the container will recognize.
|
File |
getAppBase()
This method always returns absolute path, no matter what Tomcat is up to.
|
List<FilterMapping> |
getApplicationFilterMaps(org.apache.catalina.Context context)
Gets the application filter maps.
|
List<FilterInfo> |
getApplicationFilters(org.apache.catalina.Context context)
Gets the application filters.
|
List<ApplicationParam> |
getApplicationInitParams(org.apache.catalina.Context context)
Gets the application init params.
|
boolean |
getAvailable(org.apache.catalina.Context context)
Gets the available.
|
String |
getConfigBase()
Gets the config base.
|
File |
getConfigFile(org.apache.catalina.Context context)
Returns the context descriptor filename for the given context.
|
String |
getHostName()
Gets the host name.
|
String |
getName()
Gets the name.
|
Long[] |
getResourceAttributes(String name,
org.apache.catalina.Context context)
Gets the resource attributes.
|
InputStream |
getResourceStream(String name,
org.apache.catalina.Context context)
Gets the resource stream.
|
String |
getServletFileNameForJsp(org.apache.catalina.Context context,
String jspName)
Returns the JSP servlet filename for the given JSP file.
|
boolean |
installContext(String contextName)
Deploys a context, assuming an context descriptor file exists on the server already.
|
void |
installWar(String name,
URL url)
Installs .war file at the given context name.
|
void |
listContextJsps(org.apache.catalina.Context context,
Summary summary,
boolean compile)
Lists and optionally compiles all JSPs for the given context.
|
void |
recompileJsps(org.apache.catalina.Context context,
Summary summary,
List<String> names)
Compiles a list of JSPs.
|
void |
remove(String name)
Undeploys a context.
|
boolean |
resourceExists(String name,
org.apache.catalina.Context context)
Resource exists.
|
void |
setWrapper(org.apache.catalina.Wrapper wrapper)
Sets the wrapper.
|
void |
start(String name)
Starts the context with the given name.
|
void |
stop(String name)
Stops the context with the given name.
|
void |
unbindFromContext(org.apache.catalina.Context context)
Unbinds a naming context from the current thread's classloader.
|
org.apache.catalina.Context findContext(String name)
name - the context pathString formatContextName(String name)
/ character, although there is special behavior for the root context.name - the context nameString formatContextFilename(String contextName)
/ character, although there
is special behavior for the root context.contextName - the context nameList<org.apache.catalina.Context> findContexts()
List<org.apache.catalina.connector.Connector> findConnectors()
void stop(String name) throws Exception
name - the name of the context to stopException - if stopping the context fails spectacularlyvoid start(String name) throws Exception
name - the name of the context to startException - if starting the context fails spectacularlyvoid remove(String name) throws Exception
name - the context pathException - if undeployment fails spectacularlyvoid installWar(String name, URL url) throws Exception
name - the name of the contexturl - pointer to .war file to be deployedException - if installing the .war fails spectacularlyFile getAppBase()
File getConfigFile(org.apache.catalina.Context context)
context - the contextnullString getConfigBase()
void setWrapper(org.apache.catalina.Wrapper wrapper)
wrapper - the new wrapperboolean canBoundTo(String binding)
binding - the ServerInfo of the containerboolean installContext(String contextName) throws Exception
contextName - the context path, which should match the filenametrue if deployment was successfulException - if deployment fails spectacularlyvoid listContextJsps(org.apache.catalina.Context context,
Summary summary,
boolean compile)
context - the contextsummary - the summary in which the output is storedcompile - whether to compile all of the JSPs or notvoid recompileJsps(org.apache.catalina.Context context,
Summary summary,
List<String> names)
context - the contextsummary - the summary in which the output is storednames - the list of JSPs to compilevoid discardWorkDir(org.apache.catalina.Context context)
context - the contextString getHostName()
String getName()
String getServletFileNameForJsp(org.apache.catalina.Context context, String jspName)
context - the contextjspName - the JSP filenameList<FilterMapping> getApplicationFilterMaps(org.apache.catalina.Context context)
context - the contextboolean getAvailable(org.apache.catalina.Context context)
context - the contextvoid addContextResource(org.apache.catalina.Context context,
List<ApplicationResource> resourceList,
boolean contextBound)
context - the contextresourceList - the resource listcontextBound - the context boundvoid addContextResourceLink(org.apache.catalina.Context context,
List<ApplicationResource> resourceList,
boolean contextBound)
context - the contextresourceList - the resource listcontextBound - the context boundList<FilterInfo> getApplicationFilters(org.apache.catalina.Context context)
context - the contextList<ApplicationParam> getApplicationInitParams(org.apache.catalina.Context context)
context - the contextboolean resourceExists(String name, org.apache.catalina.Context context)
name - the namecontext - the contextInputStream getResourceStream(String name, org.apache.catalina.Context context) throws IOException
name - the namecontext - the contextIOException - Signals that an I/O exception has occurred.Long[] getResourceAttributes(String name, org.apache.catalina.Context context)
name - the namecontext - the contextvoid bindToContext(org.apache.catalina.Context context)
throws NamingException
context - the catalina contextNamingException - if binding the classloader failsvoid unbindFromContext(org.apache.catalina.Context context)
throws NamingException
context - the catalina contextNamingException - if unbinding the classloader failsCopyright © 2009–2020 psi-probe. All rights reserved.