Monday, February 17, 2020

Deploying a basic web app in tomcat server.


Install Tomcat 9.
 
Edit username and password to use in tomcat-users.xml

Create a web app with name 'MyTestWebApp' in eclipse photon.
Give path of tomcat server root directory & JDK / JRE.

Create a welcome page for the app named 'welcomePage.html'.
Mention the name of this page in web.xml <welcome-page> tag.

Create a servlet with name 'MyServlet.java'

Export .war of the project created.

Access https://localhost:8080
Click on manager button.
Login using username and password mentioned in tomcat-users.xml
Deploy .war in tomcat server.

Start tomcat server by running command startServer.bat 

Access following URL in browser:- https://localhost:8080/MyTestWebApp/welcomePage.html


No comments:

Post a Comment