org.zkoss.web.init
Class LabelLocatorHook

java.lang.Object
  extended by org.zkoss.web.init.LabelLocatorHook
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class LabelLocatorHook
extends java.lang.Object
implements javax.servlet.ServletContextListener

Used to hook a label locator to locate resources from the servlet context.

Note: you don't need to specify this in web.xml if you use ZK because org.zkoss.zk.ui.DHtmlLayoutServlet will register the label locator automatically.

If you don't use ZK, you could declare


<listener>
        <description>Load i3-label.properties from this Web app</description>
        <display-name>Locating i3-label.properties</display-name>
        <listener-class>org.zkoss.web.init.LabelLocatorHook</listener-class>
</listener>

Author:
tomyeh

Constructor Summary
LabelLocatorHook()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelLocatorHook

public LabelLocatorHook()
Method Detail

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent sce)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent sce)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo