user1179510
user1179510

Reputation: 1023

Tomcat not running in eclipse

I am trying to get Tomcat to work in eclipse but it simply refuses to. I have followed this and this tutorial. But it keeps displaying the page below despite my efforts.It says that server is started succesfully in eclipse. But I am unable to access localhost:8080 in my browser. THe server works perfectly fine if I manually start it from the start menu. However when I try to run an application from eclipse it does not work. Could someone please help me out?

enter image description here

enter image description here

Upvotes: 1

Views: 3851

Answers (4)

Ashwini
Ashwini

Reputation: 1

thanks it really helped . adding the web module(ROOT) in eclipse helped Navugate to Add External web Module and added the ROOT folder to my web module.

copy the ROOT folder from TOMCAT_HOME/webapps/ROOT

Upvotes: 0

fmucar
fmucar

Reputation: 14558

you need use localhost:8080/{project-name}/FirstServlet or set the context root to / from eclipse settings to be able to access it like localhost:8080/FirstServlet

Upvotes: 0

Shiv Kumar Ganesh
Shiv Kumar Ganesh

Reputation: 3825

I have a solution for you . I guess you have configured Tomcat on Eclipse. Then click on server tab and then double click on server (as in tomcat server). A tomcat configuration page opens up. Now look at the bottom left corner of the page you would find a tab named modules. click on it. Click--->Add Module-->Navigate to Tomcats WepApp folder---> "Your Deployment Folder"

enter image description here

enter image description here

The above image shows How I navigated from Add External we Module and added the ROOT folder to my web module. Remember I added the server in eclipse. I hope you did the same.

Upvotes: 0

BalusC
BalusC

Reputation: 1109432

You seem to want to access your web project on the domain root instead of on the web project's default context root which defaults to the Eclipse project name. If your Eclipse project name is for example "myproject" then it would be available on http://localhost:8080/myproject and the FirstServlet would be available on http://localhost:8080/myproject/FirstServlet.

If you need to access the web project on the domain root, then you should change the web project's context root to /. You can do that in the Web Project Settings entry of the web project's properties which you can access by rightclicking the project and choosing Properties.

enter image description here

Please note that those Tomcat-specific 404 errors are an indication that Tomcat runs perfectly fine. If Tomcat didn't run, then you would have gotten a webbrowser-specific "Connection timeout" error page.

Upvotes: 3

Related Questions