public class ContextNamingInfoListener extends java.lang.Object implements LifecycleListener
LifecycleListener that will create context naming information environment entries.
This listener must only be nested within Context elements.
The following entries will be added to the initial context (java:comp/env implied):
context/path from Context.getPath()context/encodedPath from Context.getEncodedPath()context/webappVersion from Context.getWebappVersion()context/name from Container.getName()context/baseName from Context.getBaseName()context/displayName from Context.getDisplayName()See the Tomcat documentation for more details on the values.
| Constructor and Description |
|---|
ContextNamingInfoListener() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEmptyOnRoot()
Gets whether paths and name for the root context will be empty.
|
void |
lifecycleEvent(LifecycleEvent event)
Acknowledge the occurrence of the specified event.
|
void |
setEmptyOnRoot(boolean emptyOnRoot)
Sets whether for the root context
context/path and context/encodedPath will contain "/"
and context/name will contain "ROOT" with a version, if any. |
public void setEmptyOnRoot(boolean emptyOnRoot)
context/path and context/encodedPath will contain "/"
and context/name will contain "ROOT" with a version, if any.emptyOnRoot - whether paths and name for root context shall be emptypublic boolean isEmptyOnRoot()
public void lifecycleEvent(LifecycleEvent event)
LifecycleListenerlifecycleEvent in interface LifecycleListenerevent - LifecycleEvent that has occurredCopyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.