Sunday, 5 March 2017

How to deploy a WAR in Tomcat

Deploying WAR in Tomcat -
1.Go to tomcat/bin
2.create duplicate BAT file (alternate for Startup.bat) Eg. myStartup.bat
3.only add JRE_Home and run catlina command
Eg.
 
set "JRE_HOME=C:\Program Files (x86)\Java\jre1.8.0_31"
catalina.bat run


4.Go to tomcat/conf

Search Server.xml - update HTTP port to 8080
Search tomcat-users.xml -update  user rolesnames
Eg.
<user>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="admin" roles="admin-gui,manager-gui"/>

5.Now add WAR file  to tomcat/webapps

6.run newly created BAT file.

7.Hit url in browser "localhost:8080"

It will navigate to Apache Home.

8.Click on Server Status. It will show a pop up.
use username-'admin'
      password -'admin'

(From tomcat-users.xml for ádmin role username and password.)

9.Click on List applications to see project SMLConfigurator.

Click it load login page.

No comments:

Post a Comment