How to run tomcat within eclipse Java Project

41,571

Solution 1

You can use Add Server from Servers tab to define a new server.

enter image description here

I am not sure why do you want it without Dynamic Web Project

Solution 2

click on this Installing Apache Tomcat Server

after doing what is in the link, then make new dynamic project in the eclipse then add new jsp and new servlet ,then right click on the your jsp then "Run As" then "Run on Server" then click on the installed application server.

Solution 3

Try the following:

  1. Window > Preferences > Server > Runtime Environments > Add
  2. Select the version of Apache Tomcat that you have available
  3. Browse to the Apache Tomcat installation directory
  4. Click Finish

You should have access to the Apache Tomcat server now

Share:
41,571
Mr.Queries
Author by

Mr.Queries

Updated on July 09, 2022

Comments

  • Mr.Queries
    Mr.Queries almost 2 years

    *Not Eclipse Dynamic web project, but Eclipse Java project *

    I am building my first website and I am using Java. I can connect to tomcat with my browser and I opened the main web page in the browser using tomcat (after deploying), but I wish to connect directly to tomcat inside Eclipse. (I have now just one servlet and one jsp file).

    Thanks in advance.