• 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的各个组件。

  • 相关阅读:
    函数指针
    指针和数组的关系
    const修饰指针的三种效果
    指针做函数参数 (间接赋值是指针存在的最大意义)
    野指针
    指针
    JSP九大内置对象
    Android--获取App应用程序的大小
    Android--获取标题栏,状态栏,屏幕高度
    Android--获取使用的总流量和每个App的上传、下载的流量
  • 原文地址:https://www.cnblogs.com/2018/p/2154264.html
Copyright © 2020-2023  润新知