score:-2

this is the best solution. it worked for me.

steps:-

1- open the servers tab from windows » show view » servers menu.

2- right click on the server and delete it

3-create a new server by going new » server on server tab.

4-click on configure runtime environments link.

5-select the apache tomcat server and remove it. this will remove the tomcat server configuration.

6-click on ok and exit the screen above now.

7-from the screen below, choose apache tomcat server and click on next button:

8-browse to tomcat installation directory.

9-click on next and choose which project you would like to deploy:

10-click on finish after adding your project.

11-now launch your server.

score:0

if you can't detect which project creates the problem then simply add and remove it in your server and run. if defective project is not anymore added to the server then server will run correctly. after detecting the problem you can simply follow the steps below.

if you are using data base connection with connection pooling then make sure @resource(name="jdbc/dbname") is written before private datasource datasource in your servlet controller class. just put it like this in your servlet controller class:

@resource(name="jdbc/sakila")
private datasource datasource;

score:0

right click on the project you work on > build path > configure build path > libraries > add external jars--servlet-api.jar and jsp-api.jar if you are deploying web application

score:0

there was once i had messed around the server.xml file, and unwittingly added a context tag telling the server to load a project i wasn't looking to load, and therefore had not compiled. that threw the server tomcat v9.0 server at localhost failed to start, which went away after i deleted that.

score:0

  1. go to directory (your workspace).metadata.plugins\org.eclipse.wst.server.core\tmp0\conf
  2. open server.xml file on editor
  3. delete <context docbase="(your workspace)\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\(your old project)" path="/(your old project)" reloadable="true" source="org.eclipse.jst.jee.server:(your old project)"/>

there might be some left over from your old project. so, only delete projects that have not been used or that were previously deleted. because if you delete one line then your server will be able to run but not with your project. because some of your project lines were deleted too.

score:0

i uninstalled tomcat server, deleted the server from eclipse and reinstalled, reattached tomcat. it's running fine now.

score:0

  1. open the 'server.xml' file. picture1

  2. press ctrl + f and find the 'shutdown' word. then change the port number. picture2

  3. done. because when the connection port number and shutdown port number are the same, then it creates conflict. so, one port number we should change.

score:0

this happens because your server http port and your shutdown port are the same.

to resolve this, go to the server.xml file and search. there will be a shutdown port entry. change it and your server will work.

score:0

there is a possibility that you are missing a "/" in your web.xml file probably in: <servlet-mapping></servlet-mapping>

<url-pattern> missing "/" before pattern name </url-pattern>

possible issue

score:0

if you are using spring framework, please check in the web.xml dispatcher servlet is configured correctly. also check if there is any spelling/name incorrectness.

score:0

change your redirect port in server.xml to something else and it should work

 <connector connectiontimeout="20000" port="8080" protocol="http/1.1" redirectport="8900"/>

score:0

just check your console. than search for relevant solution i did everthing, but ended up deleting a mapping error shown in console from web.xml

score:1

have you tried to put / in the webservlet above your class?

@webservlet("/nameurl")
public class myclass extends httpservlet{}

score:1

i was facing a similar problem in my spring mvc project. the problem was in the web.xml file. so in spring 5 before you configure your dispatcher servlet you have to use the tag

<absolute-ordering></absolute-ordering>

worked fine for me. happy coding.

score:1

in my case, i had messed up up with my jar files. my jar files were corrupted. so delete existing jar files and upload new jar files. hope this works. *check 'markers' tab for errors and warnings.

score:2

i had the same problem with tomcat 9.xx and eclipse. none of the given solutions helped me.

however, there is a missing step (for some of us) before recreating a new server in eclipse you may need to add the path to a jar file. the missing step was browsing to your /tomcat-directory/lib/servlet-api and adding servlet-api.jar

steps:

1- right click on the project you work on > build path > configure build path > libraries > add external jars

2- select all jar files from the tomcat/bin and tomcat/lib

3- click "ok"

this made it work for me. i hope it will help you as well.

thank you.

score:2

  1. delete server by navigating to window->show view->server. right click on server and delete it.
  2. delete servers folder from project explorer
  3. delete .metadata of eclipse workspace (caution: you will loose all your workspace settings (e.g.: key bindings, appearance, ...))
  4. now restart eclipse and add apache tomcat server.

it will work.

screenshot


Related Query

More Query from same tag