How to integrate Eclipse Luna and Tomcat 6 in Linux mint

First, solve the problem. Then, write the code. ~ John Johnson

Using Tomcat within eclipse means all configuration, coding, deployment and management can happen within Eclipse interface. Eclipse offers application server integration via set of plugins called Web Tools Platform. This set of components includes engines for managing, developing, compiling and deploying web artifacts.

NB: This tutorial assumes you have already successfully installed Tomcat on your machine.

Installing WTP

Launch your eclipse, click on help and select Install new software. You will get a screen like this:

1

Click on the add button. You will get the following screen:

2

In the name put web tool platform and location put this url http://download.eclipse.org/webtools/updates and click OK.

Wait for a moment and you will get the following screen:

3

Select web tools platform SDK and click next follow the screen to finish the installation of WPT. After the installation restart your Eclipse for changes to take effect.

Configuring The Tomcat Runtime

Now that we have installed the WPT, we can specify Tomcat as a runtime environment. Setting up a Runtime Environment in Eclipse basically means tellings its engines where to look for your application server, so it can utilizes its components and automatically configure your workspace.

After restarting your Eclipse go to window/preferences/server/runtime. You will get the following screen:

4

Click on add button and select apache you will get the following Screen:

5

Select your installed version of Apache Tomcat and click next. In our next screen you will need to specify the tomcat installation directory. Click on browse and navigate to Tomcat installation directory. You will get the following screen and click finish:

6

Now you need to switch perspective in your Eclipse environment. This is how you do it, go to window/open perspective/other/Java EE . In your console window you will get something like this:

7

Click on the link to create new server: You will get a screen like this:

8

Select your Installed Apache Tomcat version and click finish. Your result will be:

9

NB: For Linux user if you tried to set up you Tomcat installation directory and you got some errors. Something like web apps not found. Here is the solution for you. Launch you terminal windows and key in the following commands.

  • cd /usr/share/tomcat6
  • sudo ln -s /var/lib/tomcat6/conf conf
  • sudo ln -s /var/lib/tomcat6/conf conf
  • sudo ln -s /var/lib/tomcat6/webapps webapps

Congratulation for adding a server runtime in your working environment.

Leave a comment