org.sr.server.http
Class SRContextLoaderListener
java.lang.Object
org.sr.server.http.SRContextLoaderListener
- All Implemented Interfaces:
- java.util.EventListener, javax.servlet.ServletContextListener
public class SRContextLoaderListener
- extends java.lang.Object
- implements javax.servlet.ServletContextListener
This class is designed to load configuration files at the beginning of Web Container initialization.
It gets "jsonConfig" context parameters and load files that are located under your WEB-INF directory.
You should add following lines to your web.xml file to activate this listener.
<context-param>
<description>SR Config Files</description>
<param-name>srConfigFilesPattern</param-name>
<param-value>SR.*.xml</param-value>
</context-param>
<listener>
<description>SRContextLoaderListener</description>
<display-name>SRContextLoaderListener</display-name>
<listener-class>
org.sr.server.http.SRContextLoaderListener
</listener-class>
</listener>
- Author:
- Serhat Dirik
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SRContextLoaderListener
public SRContextLoaderListener()
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyed
in interface javax.servlet.ServletContextListener
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitialized
in interface javax.servlet.ServletContextListener