Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run tomcat within eclipse Java Project

*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.

like image 689
Mr.Queries Avatar asked Jul 30 '13 07:07

Mr.Queries


People also ask

How do I open Tomcat in Eclipse?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.

Does Eclipse include Tomcat?

Eclipse is a very powerful development environment for Java. Mainly for Web Development project you need Web Server. Apache Tomcat is the best production ready web container. By default when you download Eclipse IDE, it doesn't come with Tomcat install with it.


2 Answers

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

like image 185
Hardik Mishra Avatar answered Nov 06 '22 19:11

Hardik Mishra


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.

like image 23
samimvp Avatar answered Nov 06 '22 21:11

samimvp