Hi Martin,
First, yes, the
Java 2 SDK needs to be installed before you use Eclipse, because it doesn't come with its own compiler. You don't need the
J2EE installation, though the j2ee.jar file has all the servlet packages in it.
Instead all you need to import is servlet.jar, which comes with
Tomcat or can be downloaded directly. Compilation then proceeds normally, i.e., extend HttpServlet, save your code, etc.
The hard part is installing the servlet in your web server, because you probably want to keep the servlet in your own Java project rather than build a Java project in your server's webapps directory (assuming you're using Tomcat again).
The way I do it is to use
Ant (jakarta.apache.org). Ant comes with a predefined <war> task that will build the war file for you, and predefined tasks for copying the war file to the proper location.
Good luck,
Ken Kousen
Originally posted by Martin Clausen:
Hi there.
How do I compile/run/debug servlets using Eclipse 2.0.1. What do I need to import/setup ? does J2SDKEE need to be installed before I install Eclipse ? a step by step guide from standard Eclipse installation to compiled/run basic servlet would be great, but of course any help would be greatly appreciated.
Cheers,
Martin