The Eclipse Platform (Windows, Linux and MAC OS X)

The Eclipse Platform is designed for building
integrated development environments (IDEs) that can be used to create
applications as diverse as web sites, embedded JavaTM programs, C++
programs, and Enterprise JavaBeansTM. It is not only packed with features
that you will only find in expensive IDEs like Borland JBuilder, but also it
is free. (Note: Eclipse works for Windows, Linux, Solaris, and Mac OSX)

Here is a step by step guide to setup
Eclipse with Tomcat.

Get Eclipse:
1.) Go to http://download.eclipse.org/downloads/drops/R-3.0.1-200409161125/index.php and download the latest Eclipse.
2.) Unzip eclipse .zip file.
3.) Go into the folder you just unzip and launch eclipse.exe.
4.) Now close Eclipse.

Creating the application folders:

Prior to launching Eclipse and developing, we have a few things to do in
order to setup the web application.
1.) Close Eclipse.
2.) Create a directory in the webapps directory of your Tomcat folder (which
we will refer to $APP_BASE).
3.) In your $APP BASE, create a directory WEB-INF.
4.) In $APP_BASE/WEB-INF/, create a directory classes and a directory lib.
5.) Create a $APP_BASE/src directory.
6.) Copy the web.xml (attached on this mail) to $APP_BASE/WEB-INF/.

(If you don't want to do all this, just download the template.zip, unzip it,
and put it in you tomcat's webapps directory. The template folder contains
all of the folders and web.xml file.)

Creating a new application in Eclipse:
Now it's time to open Eclipse. When you first open Eclipse, you have 4
windows, called views. I will not
speak any further about views and perspectives - each view and what it does
are pretty well documented in
Eclipse documentation.
1.) To create a new application. Click on File -> New -> Project... .
2.) A window opens, in which we select Java in the first frame and Java
Project in the second frame. Click on Next.
Type a project name (like project1) in the Project Name field. Uncheck the
box "Use defaults" for the
Project Content, and browse your disk to set the directory to $APP_BASE.
3.) Click on Next, a message box asks you if you want to create the project
now, click on Yes.
a.) On the Source tab, set the "Default output folder" to
$APP_BASE/WEB-INF/classes. Click on "Add Folder" and there select
$APP_BASE/src.
b.) On the Libraries tab, click on Add external JARs and add servlet.jar
or servlet-api.jar from "your tomcat directory"/common/lib/. Click on
Finish.

Write your first Java class:
1.) Once you have completed the steps above, you should see "project1" in
the navigator window. Right-click on "project1" -> New -> Other... .
2.) Select Class and hit next.
3.) Put in a name at the Name field for your new java class, and then hit
Finish.
4.) A java file will be created in $APP_BASE/src folder.
5.) When you hit save or "build project", a class file will be compiled at
$APP_BASE/WEB-INF/classes.