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.
  1. You currently have Eclipse - Galileo JEE installed.
  2. You have JDK 1.6 installed.

Apache-Tomcat Server set-up:

  1. You can download the binary distributions for Apache 6.0.29 from: http://tomcat.apache.org/download-60.cgi
  2. Unzip or Untar the folder. Place this folder in a convenient location (we will refer to this location as “<apache>/” ).
  3. Next Open Eclipse and set-up the environment:

    1. 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)
    2. 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

    PIC

  4. Then go to menu WindowPreferencesServerRuntime Environments.

    1. 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.
    2. Under Tomcat installation directory: point to the “<apache>/” directory we saved earlier.
    3. JRE: Choose the default workbench JRE
    4. Click Finish, apply and exit preferences to conclude this step.

    PIC

    PIC

  5. Now you should be back to the Eclipse mainscreen.

    1. Right-click in the “Servers” tab
    2. Click NewServer
    3. You should see another list of server options. Open the Apache tree and choose “Tomcat v6.0 Server”
    4. Click finish to see a new server listed in the Servers Tab

    PIC