Deploy WAR file to Tomcat Server.

To deploy a an application in the .war format to the tomcat server just follow these below simple steps:

1. Check with the apache tomcat installation directory in bin folder. Go to command mode to above bin location and run startup.bat, you should get as in below figure



2. If the server didnt start and gives an error that the JDK is required, then download the JDK from the oracle site and follow below steps to setup the classpath.

3. After the jdk is installed, copy till jdk location of the jdk. Go to advanced tab in the properties of my computer. Click on the Environment Variables, click on new of user variables and enter name as JAVA_HOME and paste the location till jdk copied in variable value.



4. Now edit the system variable path as below to add the JAVA_HOME in the format as below.
;%JAVA_HOME%\bin;



5. Now go ahead with step 1, the server should get started. To verify this go to browser and type http://localhost:8080/ you show see the below screen



6. Just copy the intended .war file to the location /webapps folder. Shutdown the server and start the server again from the command mode. The WAR is extracted by tomcat and you can access the application with its context.
http://localhost:8080/ApplicationContext

Hope this helps

Comments

Popular Posts