zoukankan      html  css  js  c++  java
  • Java AJAX开发系列 2,项目中使用ZK

    开发环境 Zk Studio

    ZK Studio插件

    image

    Pom.xml

    <repositories> 添加ZK的仓库地址

    <repository>

    <id>zk repository</id>

    <url>http://mavensync.zkoss.org/maven2</url>

    </repository>

    其中的依赖项设置

    <!-- ZK -->

    <dependency>

    <groupId>commons-logging</groupId>

    <artifactId>commons-logging</artifactId>

    <version>1.1.1</version>

    </dependency>

    <dependency>

    <groupId>commons-io</groupId>

    <artifactId>commons-io</artifactId>

    <version>1.3.1</version>

    </dependency>

    <dependency>

    <groupId>commons-lang</groupId>

    <artifactId>commons-lang</artifactId>

    <version>2.4</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.theme</groupId>

    <artifactId>breeze</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zul</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zkplus</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zhtml</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.common</groupId>

    <artifactId>zweb</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.common</groupId>

    <artifactId>zcommon</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zuljsp</artifactId>

    <version>1.5</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zkplus</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <!--

      <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zml</artifactId>

    <version>3.6.4</version>

    </dependency>

    -->

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zul</artifactId>

    <version>5.0.7.1</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zkspring-core</artifactId>

    <version>3.0</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zk</groupId>

    <artifactId>zkspring-security</artifactId>

    <version>3.0</version>

    </dependency>

    <dependency>

    <groupId>org.zkoss.zkforge.el</groupId>

    <artifactId>zcommons-el</artifactId>

    <version>1.1.0</version>

    </dependency>

    <dependency>

    <groupId>org.beanshell</groupId>

    <artifactId>bsh</artifactId>

    <version>2.0b4</version>

    </dependency>

    <!-- ZK's End -->

    Web.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>

    <listener>

    <description>Used to cleanup when a session is destroyed</description>

    <display-name>ZK Session Cleaner</display-name>

    <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class>

    </listener>

    <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>zkLoader</servlet-name>

    <url-pattern>*.zhtml</url-pattern>

    </servlet-mapping>

    <servlet-mapping>

    <servlet-name>auEngine</servlet-name>

    <url-pattern>/zkau/*</url-pattern>

    </servlet-mapping>

    如上配置完成后,即可在项目使用ZK的功能,上面的Maven配置包括了常用的ZK的各个组件。

  • 相关阅读:
    windows系统-web渗透工具-AWVS
    PHP.9-HTML+CSS(三)-CSS样式
    PHP.10-PHP实例(一)-简单的计算器
    PHP.8-HTML+CSS(二)-HTML详解
    PHP.7-HTML+CSS(一)-HTML语法、常用字符实体、颜色代码
    noip2018 铺设道路
    noip2018游记
    luogu题解P1967货车运输--树链剖分
    ZROI-Day2比赛解题报告
    ZROI Day1 比赛解题报告
  • 原文地址:https://www.cnblogs.com/2018/p/2154264.html
Copyright © 2011-2022 走看看