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
- go to directory (your workspace).metadata.plugins\org.eclipse.wst.server.core\tmp0\conf
- open server.xml file on editor
- 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
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>
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
- delete server by navigating to window->show view->server. right click on server and delete it.
- delete servers folder from project explorer
- delete .metadata of eclipse workspace (caution: you will loose all your workspace settings (e.g.: key bindings, appearance, ...))
- now restart eclipse and add apache tomcat server.
it will work.
Source: stackoverflow.com
Related Query
- Server Tomcat v9.0 Server at localhost failed to start
- server tomcat v8.0 server at localhost failed to start
- Server Tomcat v9.0 Server at localhost failed to start in eclipse
- Server Tomcat v8.5 Server at localhost failed to start in Eclipse
- Server Tomcat v8.5 Server at localhost failed to start caused by: java.lang.ClassNotFoundException
- Server Tomcat v9.0 Server at localhost failed to start is the message in eclipse
- Server Tomcat v8.0 at localhost failed to start : Failed to Start Component in Eclipse for JSP
- Server Tomcat v10.0 Server at localhost failed to start
- Server Tomcat v7.0 at localhost failed to start
- Eclipse: Server Tomcat v8.0 Server at localhost failed to start
- Eclipse: Server Tomcat v8.0 Server at localhost failed to start
- Server Tomcat v8.0 Server at localhost failed to start - JSF, CDI, JAVA, TOMCAT, ECLIPSE
- "Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal
- Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds
- Keep getting error that says Server App Engine Standard at localhost failed to start
- Server App Engine Standard at localhost failed to start
- Server Google App Engine (1.8.2) at localhost failed to start
- Tomcat server 9.0 not starting in eclipse It showing error "Server Tomcat v9.0 Server at localhost failed to start."
- Tomcat 7 server failed to start after creating a servlet using eclipse
- Tomcat doesn't start from eclipse on startup : Several ports (8005, 8080) required by Tomcat Server at localhost are already in use
- Server Tomcat v7.0 Server at localhost was unable to start within 90 seconds
- Tomcat localhost failed to start
- Starting Apache Tomcat v7 at localhost has encountered a problem and failed to start in eclipse
- Tomcat v8.0 Server Failed to Start
- Server Tomcat v8.5 failed to start for hello world Jersey Web Service
- After integrating Struts Core 1.3.10 - Tomcat 8.0.21 server at localhost fails to start
- when I set the tomcat server with the Eclipse,It tells "Server Tomcat v8.0 Server at localhost failed to start."
- Server Apache TomEE at localhost failed to start
- Eclipse + Tomcat 7 + Audit Trial DataSource - Server Failed to start
- Tomcat 7 server won't start within eclipse with error `Starting Tomcat v7.0 Server at localhost (2) has encountered a problem`
More Query from same tag
- Eclipse debug-time classpath problem: How do you include a dependent project's output into a web project's runtime classpath?
- YouTubeAndroidAPIDemo does not run
- getting error when i write java program in eclipse
- Unable to do a 'get' using Eclipse TEE Plugin (TFS)
- apache ant increase memory and speed
- EGit won't add lib folder to vcs
- Fix eclipse error
- Install Eclipse for C/C++ in Ubuntu 20.04 LTS Error/Crash on Run
- How to build Eclipse JDT Core from source code via Git?
- Error while running ant build from eclipse on Linux. Cannot call wsimport from ant
- I just cant get to open WSDL file in Eclipse J2EE Galileo
- UnsupportedClassVersionError use SwipeListView
- Eclipse Mars - one specific file will not open in compare editor?
- BluetoothChat Android Example Runtime Error
- My installed apps is suddenly stopped in emulator
- Unable to resolve target 'android-15' until the SDK is loaded
- Search for the references to a layout xml file in android code using eclipse IDE for android
- Question: I want to delete directory from my maven project when i am running mvn eclipse:clean
- How can I run code in Eclipse IDE using keyboard shortcut keys
- Logger not logging all events?
- extremely frustrating with eclipse luna
- add simple form in plug in development
- Libxml program in CPP
- Installing Google Plugin for Eclipse in Eclipse Android Developer Tools (ADT) Bundle
- Specifying minor version in JDK Compliance eclipse
- ButtonClick -> ImageView on new screen?
- xtext writing and interpreter
- How to determine which source files are required for an Eclipse run configuration
- Redhat freezes when running Team Explorer Everywhere with Eclipse
- How to search and replace phrase in eclipse/regex