File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Integrating Tomcat with Eclipse 2.1.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Integrating Tomcat with Eclipse 2.1.1" Watch "Integrating Tomcat with Eclipse 2.1.1" New topic

Integrating Tomcat with Eclipse 2.1.1

Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
Hello, I am have real difficulty integrating tomcat into eclipse on my Windows 2000 Professional operating system ...
I would appreciate it if anyone knows of a great link or just knows how to do it...
Thanks again,
Unnsse Khan
Ranch Hand

Joined: Nov 12, 2001
Posts: 511
Sorry I didn't get into specifics...
On my Windows 2000 Professional operating system, I have the following set as:
(1) The Java 2 SDK 1.4.2 set to c:\java\j2sdk-1.4.2, system environmental variable: JAVA_HOME = c:\java\j2sdk-1.4.2
(2) The Eclipse 2.1.1 Java IDE, placed in: c:\ecplise\
(3) Tomcat (which I downloaded as a jakarta-tomcat-4.1.24.exe file) from
(4) The Sysdeo Tomcat plugin for exclipse, which came as: which I downloaded from:
When, then proceeded and unzipped this file into c:\eclipse\plugins as the following subdirectory: com.sysdeo.eclipse.tomcat_2.1.0
(5) Plugin activation : select menu 'Window->Customize Perspective...', expand 'Others' and check 'Tomcat'
(6) Set Tomcat home : Window -> Preferences, select Tomcat and set Tomcat home

(7) This plugin launches Tomcat using the default JRE checked in Eclipe preferences window.

(8) To set a JDK as default JRE for Eclipse open the preference window : Window -> Preferences -> Java -> Installed JREs.

(9) This JRE must be a JDK (This is a Tomcat prerequisite).

(10) The plugin sets itself Tomcat classpath and bootclasspath. Use Preferences -> Tomcat ->JVM Settings, only if you need specific settings.
Ok, everything seems to be working... From the toolbar of eclipse there are the prospective start and stop tomcat icons... The start works... Now, when
I wrote a simple test servlet as:
import javax.servlet.*;
import javax.servlet.http.*;
public class Lion extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("Hello World");
(Please take notice that I took the tag braces off the tags because the "add reply" for sending this message wouldn't work. Please assume that there is nothing wrong with this code.)
and placed the Lion.class, as follows:
This particular error came about (when I pointed the browser to:
Here's the error message:
HTTP Status 404 - /Lion/servlet/Lion
type Status report
message /Lion/servlet/Lion
description The requested resource (/Lion/servlet/Lion) is not available.
I still haven't configured the web.xml file... Doesn't eclipse do this automatically?
If anyone can help me with just getting a simple HelloWorldServlet working through eclipse, with my current development environment, I would be very grateful.
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
try set CATALINA_HOME as System variable with value of your Tomcat root directory. On my box its D:\Tomcat41 (I allways simplify path names of open source projects).
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

Try this post:

Regards, Rene Larsen
Dropbox Invite
wood burning stoves
subject: Integrating Tomcat with Eclipse 2.1.1