How to host web application in apache tomcat

I created a small web application in Java using eclipse. Now I want to host it in apache in my local machine. How to do this? I want some simple instructions not very technical details.
Thanks in advance.

Answer

If you’re using Eclipse IDE for Java EE developers, it is easy to create dynamic web projects and directly integrate Tomcat.

Do the following steps in Eclipse:

  1. Open the Servers view in the bottom box, rightclick there and choose New > Server. Pick the appropriate Tomcat version and complete the wizard.

  2. Create new dynamic web project in Eclipse which is associated with the integrated Tomcat. Open the Project Navigator on the left hand side. Rightclick there and choose New > Project and then in menu Web > Dynamic Web Project and set the Target Runtime to the Tomcat.

  3. Deploy the web app to Tomcat from within Eclipse by choosing “Right click Servlet src > Run on Server” This will open a browser and you can test your app

Attribution
Source : Link , Question Author : user58859 , Answer Author : Community

Leave a Comment