Reputation: 361
*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.
Upvotes: 6
Views: 54500
Reputation: 278
I see what you mean, but there is no particular difference for you to choose between Dynamic Web Project and Java Project.
Simply select Dynamic Web Project, and call your standard java classes from servlet pages.
That way you will get free debug tools built-in for Java Servlet from Eclipse plus.
Upvotes: 0
Reputation: 141
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.
Upvotes: 2
Reputation: 1209
Try the following:
You should have access to the Apache Tomcat server now
Upvotes: 1
Reputation: 14887
You can use Add Server
from Servers
tab to define a new server.
I am not sure why do you want it without Dynamic Web Project
Upvotes: 2
Reputation: 9705
Convert your project to a "Dynamic Web Project", right-click it and pick "Run As" -> "Run on Server". In the dialog that pops up, select "Manually define a new server" and follow the steps to configure your Tomcat server inside Eclipse.
Upvotes: 0