Configuration of Eclipse and Tomcat

1. Install Eclipse and Tomcat
Extract compressed files into your desired directories.
2. Create an Environment Variable JAVA_HOME for Tomcat if under Windows environment
Start --> Control Panel --> System --> Advanced --> Environment Variables
--> System Variables --> New :
name: JAVA_HOME
value: "Path to tomcat"

To verify, start cmd shell and type: set java_home
3. Start Tomcat Server
a. From a shell:
Navigate to bin sub-directory in tomcat's directory
In Windows:
startup.bat 
or in Linux:
startup.sh 


b. From Eclipse
Window --> preference --> Server --> Runtime Environment --> "add"
then
Window --> Show View --> Server
In the Server view, click Start the server icon
4. To add a project from Eclipse to Tomcat:
In the Server view, click Tomcat server and chose "Add and Remove" to add project.
Note: A project can also be put directly under the "webapps" directory of Tomcat.

No comments: