Setting Up ZK Spring"
From Documentation
m |
|||
Line 9: | Line 9: | ||
* Configure downloaded ZK & ZK Spring binaries as your web application libraries by either directly copying into WEB-INF/lib or putting them on your web application classpath | * Configure downloaded ZK & ZK Spring binaries as your web application libraries by either directly copying into WEB-INF/lib or putting them on your web application classpath | ||
* Add <code>org.zkoss.zk.ui.http.DHtmlLayoutServlet</code> & <code>org.zkoss.zk.au.http.DHtmlUpdateServlet</code> and their mappings in web.xml as shown below. | * Add <code>org.zkoss.zk.ui.http.DHtmlLayoutServlet</code> & <code>org.zkoss.zk.au.http.DHtmlUpdateServlet</code> and their mappings in web.xml as shown below. | ||
+ | <source lang="xml"> | ||
+ | <servlet> | ||
+ | <servlet-name>zkLoader</servlet-name> | ||
+ | <servlet-class> | ||
+ | org.zkoss.zk.ui.http.DHtmlLayoutServlet | ||
+ | </servlet-class> | ||
+ | <init-param> | ||
+ | <param-name>update-uri</param-name> | ||
+ | <param-value>/zkau</param-value> | ||
+ | </init-param> | ||
+ | <load-on-startup>1</load-on-startup> | ||
+ | </servlet> | ||
+ | |||
+ | <servlet> | ||
+ | <servlet-name>auEngine</servlet-name> | ||
+ | <servlet-class> | ||
+ | org.zkoss.zk.au.http.DHtmlUpdateServlet | ||
+ | </servlet-class> | ||
+ | </servlet> | ||
+ | |||
+ | <servlet-mapping> | ||
+ | <servlet-name>zkLoader</servlet-name> | ||
+ | <url-pattern>*.zul</url-pattern> | ||
+ | </servlet-mapping> | ||
+ | |||
+ | <servlet-mapping> | ||
+ | <servlet-name>auEngine</servlet-name> | ||
+ | <url-pattern>/zkau/*</url-pattern> | ||
+ | </servlet-mapping> | ||
+ | </source> | ||
− | * In addition to this you will aslo need to declare Spring ContextLoaderListener in web.xml to be able to declare and register your Spring beans with Spring framework. | + | * In addition to this you will aslo need to declare Spring ContextLoaderListener in web.xml to be able to declare and register your Spring beans with Spring framework. |
+ | <listener> | ||
+ | <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | ||
+ | </listener> |
Revision as of 02:10, 22 February 2011
Follow the simple steps below to start using ZK Spring Integration Library
Purpose
Download and configure ZK Spring Integration Library
Prerequisites
- Download latest ZK binaries.
- Download latest Spring binaries.
- Download latest ZK Spring Integration Library
Installing the libraries
- Configure downloaded ZK & ZK Spring binaries as your web application libraries by either directly copying into WEB-INF/lib or putting them on your web application classpath
- Add
org.zkoss.zk.ui.http.DHtmlLayoutServlet
&org.zkoss.zk.au.http.DHtmlUpdateServlet
and their mappings in web.xml as shown below.
<servlet>
<servlet-name>zkLoader</servlet-name>
<servlet-class>
org.zkoss.zk.ui.http.DHtmlLayoutServlet
</servlet-class>
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>auEngine</servlet-name>
<servlet-class>
org.zkoss.zk.au.http.DHtmlUpdateServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
- In addition to this you will aslo need to declare Spring ContextLoaderListener in web.xml to be able to declare and register your Spring beans with Spring framework.
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>