Você está na página 1de 19

ZK Sample2 Application Setup

Prepared by Senthil Muthiah


http://emrpms.blogspot.in/

Working in ZK is fun

TABLE OF CONTENTS
TABLE OF CONTENTS ................................................................................................................................................................................................................ 2
1.

INTRODUCTION .................................................................................................................................................................................................................. 3

2.

SOFTWARES ........................................................................................................................................................................................................................ 4

3.

SVN CLIENT INSTALLATION ....................................................................................................................................................................................... 4

4.

DOWNLOAD ZK SAMPLE2 SOURCE CODE ............................................................................................................................................................ 9

5.

COMPILE CODE AND CONVERT PROJECT TO SUPPORT ECLIPSE IDE. ...............................................................................................13

Page 2 of 19

1. Introduction
The Zksample2 project is a demo application that shows the integration of the zk AJAX web
framework with several common used frameworks for database access, middle ware, security and
reporting. Developed by Stephan. (http://www.forsthaus.de/blog/?page_id=2)

About the Authors


Dipl.rer.pol. Stephan Gerth is a great fan of the ZK framework. He's the initiator of
the Zksample project and a Zkoss forum contributor as 'TerryTornado'.
If you need help by your zk projects with integrating spring and hibernate you can
hire him worldwide.
Bjrn Bruhns is a Java developer with about 15 years experience. He's working a
long time in the enterprise environment for big automotive companies . Bjrn doing
most of the complex technical initial implementations of the sample project. His
Zkoss forum nick is 'Daibutsu'.

You can reach the online sample application at the start page: http://www.zk-web.de/zksample2/
This document will explain how to download the source code and setup it locally. And also this documentation
is the continuation of my previous Part 1 and Part 2. So before start, I would recommend to complete Part 1
and Part 2 setup document.
Many thanks to Stephan who helped me lot to understand very basic stuffs and also this ZK Sample
2 application taught me how to write good quality code.

Page 3 of 19

2. Softwares
Download the following software
SVN Client
Subversion client application used to manage source code
The software can be downloaded from http://tortoisesvn.net/downloads.html

3. SVN Client Installation


Double click TortoiseSVN-1.7.1.22161-win32-svn-1.7.1. exe file

Page 4 of 19

Select Next for the following

Page 5 of 19

Click Next for the following

Page 6 of 19

Click Install for the following

Page 7 of 19

Click Finish

Page 8 of 19

4. Download ZK Sample2 Source code


Create a folder in c:\drive as ZKSample2
Goto that folder and right click and Select SVN Check out as shown here.

Page 9 of 19

Enter the check out url as https://zksample2.svn.sourceforge.net/svnroot/zksample2/ as shown here

Page 10 of 19

Now SVN Client will download all the code from the URL. This may take few minutes to complete.

After few minutes, SVN will show the completed status as shown here.

Page 11 of 19

Now you can check the folders and content inside each folder as shown here

Page 12 of 19

5. Compile Code and Convert Project to support Eclipse IDE.


Open command Prompt and goto c:\ZKSample2\trunk\KeyGenZkoss as shown here

Now issue the command mvn clean install D maven.test.skip


Wait for few minutes, it will download all the required jar files.

Page 13 of 19

Execute the same command for all the other two folders as shown here.

It may take several minutes to download all the required jar files.

Page 14 of 19

Now let us make all these projects to support Eclipse IDE.


Open command Prompt
Issue Maven command mvn eclipse:eclipse -Dwtpversion=2.0 as shown below. Note you need to
execute the above command for all the three folders as shown.

Page 15 of 19

Now open eclipse and In Eclipse IDE, menu bar , Select File -> Import -> General -> Existing
Projects into Workspace -> select root directory

Page 16 of 19

Now ZK Sample2 Project will be loaded in the Explorer/Navigator as shown here.

Select Zkoss folder and Select Run on Server and Select Tomcat 7 as server as shown

Page 17 of 19

Select the Tomcat Installation directory

Page 18 of 19

Click Finish Button and Now you can see the ZK Sample 2 application

Page 19 of 19

Você também pode gostar