Package org.apache.catalina.core
Class ContextNamingInfoListener
- java.lang.Object
- 
- org.apache.catalina.core.ContextNamingInfoListener
 
- 
- All Implemented Interfaces:
- LifecycleListener
 
 public class ContextNamingInfoListener extends java.lang.Object implements LifecycleListener Implementation ofLifecycleListenerthat will create context naming information environment entries.This listener must only be nested within Contextelements.The following entries will be added to the initial context ( java:comp/envimplied):- Path: context/pathfromContext.getPath()
- Encoded Path: context/encodedPathfromContext.getEncodedPath()
- Webapp Version: context/webappVersionfromContext.getWebappVersion()
- Name: context/namefromContainer.getName()
- Base Name: context/baseNamefromContext.getBaseName()
- Display Name: context/displayNamefromContext.getDisplayName()
 See the Tomcat documentation for more details on the values. 
- 
- 
Constructor SummaryConstructors Constructor Description ContextNamingInfoListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEmptyOnRoot()Gets whether paths and name for the root context will be empty.voidlifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event.voidsetEmptyOnRoot(boolean emptyOnRoot)Sets whether for the root contextcontext/pathandcontext/encodedPathwill contain"/"andcontext/namewill contain"ROOT"with a version, if any.
 
- 
- 
- 
Method Detail- 
setEmptyOnRootpublic void setEmptyOnRoot(boolean emptyOnRoot) Sets whether for the root contextcontext/pathandcontext/encodedPathwill contain"/"andcontext/namewill contain"ROOT"with a version, if any.- Parameters:
- emptyOnRoot- whether paths and name for root context shall be empty
 
 - 
isEmptyOnRootpublic boolean isEmptyOnRoot() Gets whether paths and name for the root context will be empty.- Returns:
- indicator whether paths and name for the root context will be empty
 
 - 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Description copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 
- 
 
-