This document is intended to help those who are new to 2step. This document shows in
few steps how to install 2step using the built-in server (a subset of Jetty project)
and using Tomcat as a servlet engine.
- 1. Install 2step 7.1
Installation is very easy. Only three simple steps: get the files,
start the server, and test it. You will need Java 1.4 or newer
in order to execute 2step.
- 1.1. Get 2step 7.1
Download last 2step version and uncompress it anywhere on your disk.
- 1.2. Starting and stopping server
Just execute startup.jar and shutdown.jar to start and stop
- 1.3. Testing your installation
Go to http://localhost:8080 and
you should see a page with links to documents and example applications that
will show you more about 2step.
Congratulations, 2step is installed.
- 2. Running 2step applications with Tomcat
If for any reason you need to use another servlet engine different than
the provided one, you can use any. For the sake of simplicity we will
show how to install a 2step application in Tomcat.
- 2.1. Generating the WAR file
2step is a servlet, and servlets are kept in containers. In this document
Tomcat is the servlet container used. Now we need to add our recently created
2step application to our container. Fortunately most servlet containers support
WAR files for deploying new applications.
Although 2step main purpose is to work as a servlet, it also offers some useful
utilities invoking the file 2step.jar from the command line. One of them generates
the WAR file for installing our application in Tomcat.
java -jar <2STEP_HOME>/2step.jar war
This should have created a file called helloworld.war.
Now simply move this file to Tomcat webapps
directory to install the application in Tomcat:
mv helloworld.war <TOMCAT_HOME>/webapps
2.2. Install optional libraries in Tomcat
Copy jCharts.jar into Tomcat shared libraries directory if you want to see the
server-side generated charts of 2step administration area, or generate charts in
your own application. Here
you could also want to put other Java libraries that will be available to all your
applications contained in this Tomcat.
cp <2STEP_HOME>/lib/jCharts.jar <TOMCAT_HOME>/shared/lib
2.3. Start tomcat
Now just start Tomcat, then the WAR file will be automatically uncompressed and Tomcat will know
that contains a new application.
Our lives begin to end the day we become silent about things that matter
|Martin Luther King
Perhaps you are tired of a long day working and you just need to relax. Check out Sudoku if you want to have some fun. Enjoy !