Dies ist eine alte Version des Dokuments!
Click is a web application framework. You may read the Java Web Programming Overview fist.
Click needs a servlet container such as Apache Tomcat.
To get the Click examples served from your own tomcat server, just copy click-2.1.0/dist/click-examples.war
into CATALINA_HOME/webapps
and point your browser to http://localhost:8080/click-examples Note that Tomcat extracts the .war file into the webapps dir and serves content from the extracted directory and not from the war file. More
We call our first project translator
and create a directory for it. This dir is our project root.
We roughly follow the Quick Start Guide and copy the most files from click-2.1.0/template/
into our project to ajust them for our needs.
Copy click-2.1.0/template/WebContent/WEB-INF/click.xml
from the Click distribution to translator/WebContent/WEB-INF/click.xml
. Specify among others your Java package name, eg. sb.translator.page
and optionally the charset, the locale, the logging and caching mode in the application configuration file . More
Copy & paste the servlet configuration file translator/WebContent/WEB-INF/web.xml
directly from the quick start guide. This file is for specifying the location of the ClickServlet and the servlet is mapped to process all *.htm URL requests. More
Copy click-2.1.0.jar and click-extras-2.1.0.jar into translator/WebContent/WEB-INF/WEB-INF/lib
Create your first java file in your java package path, eg translator/src/sb/translator/page/HomePage.java
Copy click-2.1.0/template/build.xml
into our project root and run ant
Project structure:
translator/ |-- WebContent | |-- WEB-INF | | |-- click.xml | | |-- lib | | | |-- click-2.1.0.jar | | | `-- click-extras-2.1.0.jar | | `-- web.xml | |-- home.htm | `-- redirect.html |-- build.xml `-- src `-- sb `-- translator `-- page `-- HomePage.java
Symlink from tomcat to