Create a New ZK Project
Create a New ZK Project
- Click [File]/[New]/[Other...]/[ZK Project] in Eclipse main menu.
- Type the project name. Eclipse will automatically include the default ZK package configured in the ZK Package preferences, however, you can select any other installed ZK package by selecting it from the combo box. Then, click Next.
- You can modify the Source folders and Default output folder if you like. Then, click Next.
- You can modify Context root or Content directory if you like. Then, Click Finish.
- After clicking Finish, the New Project Wizard will setup the ZK Project ready for development.
- The project's top right icon includes a ZK mark to show that the project has ZK Studio support:
- The ZK package source code will be automatically attached to the related jar files
Creating a New ZUL File
Using the New File Command
You can create new ZUL file using the [File]/[New]/[File] command in Eclipse's main menu.
However, you have to write the ".zul" extension yourself and the newly create zul file will not contain any template code.
Using the New ZUL File Wizard
- There are two ways to open the New ZUL File Wizard:
- Type the file name and optional page title name, click Finish.
- The newly created ZUL File will be opened in ZUL Editor.
Running the ZK Project
To run the ZK Project (that is, to run a ZK Web application in Eclipse), please follow the instructions below:
- Configuring Apache Tomcat for Eclipse
- You are required to create a valid Apache Tomcat server configuration. Configuration of Apache with Eclipse is done in the Server/Runtime Environments preference page.
- To create a server instance to run a web application the server needs to be defined. For tutorials on how to do this, please refer to the Choose a Server Runtime Environment section of the article Tutorials – Building and Running a Web Application.
- Creating a Server instance in Eclipse's Server View
- To create a server instance, please follow the Create a Server section of the article Tutorials – Building and Running a Web Application on Eclipse's website.
- To start the server and view the result
- To start the server and view the resulting zul file, please refer to the sections Start the Server and Running the Application of the article Tutorials – Building and Running a Web Application.
- There's a detailed step-by-step tutorial on using Tomcat with Eclipse here: http://www.coreservlets.com/Apache-Tomcat-Tutorial/eclipse.html