Deploying .war file to Apache Tomcat Server : Working way

Here i am going to describe the [MANUAL]working way to deploy your .war(web application archive) file to the Apache Tomcat Server.
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
4.Launch http://localhost:[PORT]/MyProject/ on the browser, (port number might be 8080 or 8400). And Make sure the work offline option is not checked.
5.If everything is ok, the Home page of your app will be loaded into browser
6.Enjoy :)

1 comment :

  1. Thanks for this great and complete tutorial....
    It really helped me.

    ReplyDelete

Your Comment and Question will help to make this blog better...