Setting Up ZK Spring"

From Documentation
(rewrite for supported Spring version)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{ZKSpringEssentialsPageHeader}}
 
{{ZKSpringEssentialsPageHeader}}
{{ZKSpringEssentialsHeadingToc}}
 
Follow the simple steps below to start using ZK Spring Integration Library.
 
  
===Purpose===
 
Download and configure ZK Spring Integration Library
 
===Prerequisites===
 
* [http://www.zkoss.org/download/zk.dsp Download] latest ZK binaries. 
 
* [http://www.springsource.org/download Download] latest Spring binaries. 
 
* [http://www.zkoss.org/download/zkspring.dsp Download] latest ZK Spring Integration Library
 
  
===Installing the libraries===
+
Follow the simple steps below to start using ZK Spring library.
* 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 <javadoc>org.zkoss.zk.ui.http.DHtmlLayoutServlet</javadoc> & <javadoc>org.zkoss.zk.au.http.DHtmlUpdateServlet</javadoc> 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>
 
  
 +
=Prerequisites=
 +
* [http://www.zkoss.org/download/zk.dsp Download the latest ZK release] 
 +
* [https://github.com/spring-projects/spring-framework/releases Download supported Spring framework release].
 +
*: Current ZK Spring only supports Spring framework 3.1 or above.
 +
* [http://www.zkoss.org/download/zkspring.dsp Download the latest ZK Spring release]
  
* 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.  
+
=Installing ZK Spring to Your Project=
 +
* Copy downloaded ZK, Spring, and ZK Spring jar files into your web application's WEB-INF/lib or put them on your web application classpath.
 +
* Because ZK Spring depends on ZK, please follow [[ZK Installation Guide/Quick Start/Create and Run Your First ZK Application Manually]] to setup ZK first.
 +
* In addition, you also need to declare Spring ContextLoaderListener in the '''web.xml''' to be able to declare and register your Spring beans with Spring framework.  
 
<source lang="xml">
 
<source lang="xml">
 +
 
<listener>
 
<listener>
 
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
 
</listener>
 
</listener>
 +
 
</source>
 
</source>
  
Line 57: Line 27:
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| &nbsp;
+
| 3.1.1
| &nbsp;
+
| 2014/10/07
| &nbsp;
+
| rewrite for supported Spring version
 
|}
 
|}

Revision as of 07:42, 7 October 2014




Follow the simple steps below to start using ZK Spring library.

Prerequisites

Installing ZK Spring to Your Project

  • Copy downloaded ZK, Spring, and ZK Spring jar files into your web application's WEB-INF/lib or put them on your web application classpath.
  • Because ZK Spring depends on ZK, please follow ZK Installation Guide/Quick Start/Create and Run Your First ZK Application Manually to setup ZK first.
  • In addition, you also need to declare Spring ContextLoaderListener in the 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>

Version History

Last Update : 2014/10/07


Version Date Content
3.1.1 2014/10/07 rewrite for supported Spring version