Setting Up Environment
Return to Documentation.
The purpose of this section is to tell you how to prepare an environment for working with Spreadsheet in API.
Prerequisites
Before developing a web application with Spreadsheet, you should prepare the following softwares:
- Install JDK 1.5 or above
- Install an application server
- You can install any JavaEE application server you like. If you don't have one, Tomcat is a good choice.
- Install Eclipse or other development tool.
- In this book, we will use Eclipse as the default IDE to explain related setup.
Prepare a Dynamic Web Project
To save your time from creating a project out of nothing, you could just download the sample project which is a ready-to-run Eclipse dynamic web project. Even if you insist to create a project by your own, you still can reference the sample project.
There are several files inside the sample project that require to explain:
- /WEB-INF/web.xml
- This web descriptor contains minimum configuration to run Spreadsheet.
- /WEB-INF/lib
- All jar files required to run Spreadsheet are here. You should see zss.jar in it.
- /index.zul
- The page that uses Spreadsheet, and you can learn the basic usage and configuration.
- org.zkoss.zss.example.startzss.MyComposer.java
- The controller of Spreadsheet component in index.zul. It's the place where you write codes to control Spreadsheet.
Prepare a Maven Project
If you want to create a Maven project, you can [http:// download our sample Maven project] to avoid creating from scratch.
The main dependency in the sample project is org.zkoss.zss:zss:
<dependency>
<groupId>org.zkoss.zss</groupId>
<artifactId>zss</artifactId>
<version>${zss.version}</version>
</dependency>
- ${zss.version} can be 3.0.0 or above.
If you want to use Enterprise Edition (EE), you should replace org.zkoss.zss:zss with org.zkoss.zss:zssex and add org.zkoss.zk:zkmax.
<dependency>
<groupId>org.zkoss.zss</groupId>
<artifactId>zssex</artifactId>
<version>${zss.version}</version>
</dependency>
<dependency>
<groupId>org.zkoss.zk</groupId>
<artifactId>zkmax</artifactId>
<version>${zk.version}</version>
</dependency>
- If ${zss.version} is 3.0.0 or above, ${zk.version} should be 6.5.2.
Except there is no JAR under /WEB-INF/lib, the rest are the same as dynamic web project. Please read previous paragraph about explanation of web.xml, index.zul and MyComposer.java.
- reference other steps in creating a dynamic web project
Then What ?
According to your requirement,