Setting up Eclipse and Tomcat Page
Setting up Eclipse and Tomcat
NOTE: Please do not download any softwares right now. All softwares are already copied into your desktop.To create Servlet projects, you need to use a version of Eclipse with J2EE support built in. The default version of Eclipse which you get with Ubuntu does NOT include J2EE support, so you have to download a version of Eclipse with J2EE support. You can get it from the Eclipse download site: http://www.eclipse.org/downloads/ (choose according to your hardware configuration and OS)
Version: We are using Eclipse Juno (4.2) Enterprise Edition in the workshop. We suggest you also use this version, although an older version should also work fine if you are already familiar with it and using it currently.
After downloading, extract the compressed archive on your local file system. Then eclipse can be started by double-clicking on the eclipse executable file.
Further, to run servlets, you need to use the tomcat server. Even the Eclipse version with J2EE does not include the tomcat server, so you have to download and set up tomcat. Details of how to do so are below.
Creating a Tomcat server and Linking from Eclipse
- Install Apache Tomcat (version 6 at least), either by
- using a package manager on your linux installation,
- Download from moodle
- or download Apache Tomcat from http://jakarta.apache.org/tomcat and extract the compressed file containing Apache Tomcat on your local file system.
- DO NOT use the system tomcat installation which is usually on /usr/share/tomcat, since it is not writable by you. If you do this you will run into trouble later.
- Add the Apache Tomcat runtimes to Eclipse. To do so, open Eclipse and do the following:
- Using the Preferences page, you can define the server runtime environment definitions for the Apache Tomcat server. To define these definitions, complete the following:
- Click Finish.
- Configure and Test the Apache Tomcat server:
- Select Servers tab (look at the bottom right of the screen, along with other tabs such as Markers and Properties). Now right-click and select New > Server. The Define a New Server wizard opens.
Comments