Java, Tomcat, and Eclipse for Web Development - Part III
Copyright © 2005
Install Tomcat Plugin for Eclipse on Windows XP
1. Download Tomcat plugin for Eclipse
Click the following link to download the tomcat plugin for Eclipse.
Note: the above plugin is designed to work with Eclipse 3.2. If you
have downloaded a different version of Eclipse you may want to check
whether the one you download is compatible with the version of your
Eclipse or not.
Unzip the downloaded file and copy its contents to C:\eclipse\plugins\,assuming that you installed Eclipse at C:\eclipse\. Now folder C:\eclipse\plugins\com.sysdeo.eclipse.tomcat_3.2.0.beta\ should exist.
2. Configure Tomcat plugin for Eclipse
First close all Eclipse if there is any running. Start
Eclipse. This would force Eclipse to freshly load all plugins from its plugins folder.
Goto Window->Preference, then expand Tomcat in the left column of the windows. If Tomcat is not shown in the list, you may want to check whether a folder named "com.sysdeo.eclipse.tomcat_3.0.0" exits in the plugins folder of the Eclipse. If not, carefully perform step 1 again.
The folowing shows how to configure Tomcat at the top level, Tomcat, and Advanced, JVM Settings, Source Path, and Tomcat Manager App at the second level, as shown in the Preferences screen snapshot below.
Tomcat: Double click Tomcat in
the left column, the following dialog box shows. If you followed this
tutorial from the beginning, fill the information as shown.
Select Version 5.x for Tomcation version.
Enter C:\Program Files\Apache Software Foundation\Tomcat 5.5 for Tomcat home.
Choose Server.xml for Context.
Do not modify the Configuration file location. It is chosen automatically when you selected Tomcat home.
Advanced: Select Advanced under Tomcat in the left column, the following snapshot shows. You may set the Tomcat base to the same as tomcat home, which is default setting. If you are not familiar with Java Secuity, make sure Launch Tomcat using Security Manager deselected as shown below.
Java Settings: Select Java Settings under Tomcat in the left column, the following snapshot shows. The JRE entry should match what you have on your system.
Source Path: Select Source Path under Tomcat in the left column.
Tomcat Manager App: Select Tomcat Manager App under Tomcat in the left column. Enter a user name and password then click Add user to tomcat-users.xml
button to add the manager to Tomcat permanently. You will use this pair
of user name and password for application deployment later.
tomcat-users.xml is a Tomcat configuration file in XML stored in the conf directory in the Tomcat home. The file defines different roles such as admin, manager,
etc and then specifies each user's name and password and roles the user
may play. In this step, by adding the manager's user name and password
to this file, one will be able to log in to Tomcat from a Web browser
as a manager to remotely start, stop, restart, deploy any application
under the Tomcat Web server.
4. Click OK. Now the Tomcat plugin configuration is completed.
The following will show how to start a new Tomcat project.