Martin @ Blog

software development and life.

Flower

Tomcat and Eclipse integration

For my graduation project, I’m working on a J2EE-application. Because I didn’t have any experience with J2EE, I had to learn all this from scratch. Installing Tomcat (which was the application server used for the project) turned out to be very straight forward. Until this week I only installed the already available program, which worked for the largest part. However, I have to improve this program and some parts weren’t working. So, I did some research about developing on J2EE applications. I decided to use Eclipse as my IDE, because I used this environment before for simple Java-applications.
Because Eclipse is positioned as a high-end development environment supported by large corporations such as IBM and others, I figured out that there had to be a way to integrate Tomcat development in Eclipse.
It turned out that this is actually very easy. The thing is that you have to know where to find the appropriate software and documentation. Using Google I found some webpages (Javaboutique and IBM Developerworks) where is explained very clearly how to integrate Tomcat development in Eclipse.
First you have to install Tomcat (see the Tomcat site for instructions on this), then you have to install Eclipse (see the Eclipse site for instructions on this part, which is really very easy). After these two steps, you have to download the Sysdeo Tomcat-plugin for Eclipse from their site. The zipfile in which this plugin is distributed should be unzipped into your Eclipse plugin-directory (ECLIPSE_HOME/plugins). After that you have to enable the new menu-options in Eclipse which are introduced by this plugin, which can be done in Eclipse by going to the Window-menu and selecting ‘Customize perspective…’.

For detailed information, I can recommend the two links above. While these tutorials sometimes use older versions of the software, the global steps are similar and it will work (I’ve tried it). I always thought that setting up a J2EE development environment was a cumbersome process, but it is way less complicated than it may seem at first. The benefits are great, because it is very easy to create JSP-files and by two clicks they are deployed on your Tomcat-server. It may take some time at first, but then the development process is maybe easier than with PHP or even developing using Microsoft Visual Studio projects (ugh 😛 ). Maybe the most powerfull feature is the possibility to use the Eclipse Java debugger for Servlets. While I didn’t try that part yet, I’m sure this will be very usefull…

By the way, according to Google, Eclipse and Tomcat are part of Fedora Core 4, which makes the setup of the environment even easier. An added bonus is that in that case you only use open source software. On Ubuntu this is also possible, but requires some additional effort, because Eclipse is a little buggy (i.e. no syntax highlighting for Java-files) and there is no Tomcat available, so you have to install that one yourself. I think it is even possible to do it all on Windows and Mac OS X (maybe a nice thing to try when I’m at home.. I wonder how fast this all is on my Mac mini (because it is not very fast on Linux on my laptop).

One Response to “Tomcat and Eclipse integration”

  1. November 29th, 2007 at 5:37

    backseat bangers backseatbangers says:

    backseat bangers backseatbangers…

    hottest backseat bangers backseatbangers…