net.sourceforge.wurfl.core.web
Class WURFLServletContextListener
java.lang.Object
net.sourceforge.wurfl.core.web.WURFLServletContextListener
- All Implemented Interfaces:
- EventListener, javax.servlet.ServletContextListener
public class WURFLServletContextListener
- extends Object
- implements javax.servlet.ServletContextListener
ServletContextListener instantiating WURFLHolder.
This class permit to instantiate WURFL at servlet context loading time:
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>wurfl</param-name>
<param-value>/WEB-INF/wurfl.zip</param-value>
</context-param>
<context-param>
<param-name>wurflPatch</param-name>
<param-value>/WEB-INF/wb_patch.xml,/WEB-INF/other_patch.xml</param-value>
</context-param>
<context-param>
<param-name>wurflLazy</param-name>
<param-value>true</param-value>
</context-param>
<!-- the ServletContext key against store the wurflHolder. This is default -->
<context-param>
<param-name>wurflHolderKey</param-name>
<param-value>net.sourceforge.wurfl.core.WURFLHolder</param-value>
</context-param>
<listener>
<listener-class>
net.sourceforge.wurfl.core.web.WURFLServletContextListener
</listener-class>
</listener>
</web-app>
- Version:
- $Id: WURFLServletContextListener.java 432 2010-05-06 12:12:53Z filippo.deluca $
- Author:
- Fantayeneh Asres Gizaw, Filippo De Luca
|
Method Summary |
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
|
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WURFL_HOLDER_KEY_PARAM
public static final String WURFL_HOLDER_KEY_PARAM
- Servlet context parameter contains the name of WURFLHolder parameter
- See Also:
- Constant Field Values
WURFL_HOLDER_KEY
public static final String WURFL_HOLDER_KEY
- Default WURFLHolder key: net.sourceforge.wurfl.core.WURFLHolder
WURFLServletContextListener
public WURFLServletContextListener()
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
- Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
- Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Copyright © 2008-2010 WURFL-Pro srl. All Rights Reserved.