Suppose you have your web application's war file ,say MyProject.war exported from Eclipse Netbeans or similar IDE.
Steps:
1.Copy this .war file to webapps folder TOMCAT_HOME directory e.g, C:\apache-tomcat\webapps\
2.Restart the server, >> run the startup.bat in folder C:\apache-tomcat\bin
3.If the error message such as
JAVA_HOME not defined or CATALINA_HOME not defined
Then follow these steps to setup these environment variables:
- Right-click the My Computer icon on your desktop and select 'Properties'.
- Click the 'Advanced' tab (Windows XP), click on Advance System Settings on Windows7.
- Click the 'Environment Variables' button.
- Under 'System Variables', click 'New'.
- Enter the variable name as JAVA_HOME.
- Enter the variable value as the installation path for the Java Development Kit. eg. C:\Program Files (x86)\Java\jdk1.6.0_20
- Repeat the process for CATALINA_HOME variable and enter installation path for Tomcat Server, eg. C:\apache-tomcat\webapps\
- Click 'OK'.
- Click 'Apply Changes'.
- Restart the Server >> run the startup.bat in folder C:\apache-tomcat\bin
5.If everything is ok, the Home page of your app will be loaded into browser
6.Enjoy :)