Setting up Apache-Tomcat with Eclipse Galileo
(with Java EE)
9th September 2010
In this class we will be using a client-server set-up. The client side, is the
android-loaded mobile platform, while the server-side is a pre-built server container
in the form of an apache-tomcat instance. The tutorial is written under the following
assumptions.
- You currently have Eclipse - Galileo JEE installed.
- You have JDK 1.6 installed.
Apache-Tomcat Server set-up:
- You can download the binary distributions for Apache 6.0.29 from:
http://tomcat.apache.org/download-60.cgi
- Unzip or Untar the folder. Place this folder in a convenient location (we
will refer to this location as “<apache>/” ).
- Next Open Eclipse and set-up the environment:
- Make sure you are in the Java EE perspective (perspectives are listed
in the top right corner of eclipse. If it is not listed, click the yellow
plus symbol and the perspective)
- In the lower part of the eclipse window, you will see a set of tabs.
One of them should read “Servers”. If you don’t see this, click on the
yellow-plus sign at the bottom right hand corner of the window
- Then go to menu Window→Preferences→Server→Runtime Environments.
- Now click Add. This will bring up a list of different server containers
you can add. Click on “Apache Tomcat v6.0” and click next. Give it
a suitable Name.
- Under Tomcat installation directory: point to the “<apache>/”
directory we saved earlier.
- JRE: Choose the default workbench JRE
- Click Finish, apply and exit preferences to conclude this step.
- Now you should be back to the Eclipse mainscreen.
- Right-click in the “Servers” tab
- Click New→Server
- You should see another list of server options. Open the Apache tree
and choose “Tomcat v6.0 Server”
- Click finish to see a new server listed in the Servers Tab