Server Tomcat v9.0 Server at localhost failed to start in eclipse
This is an issue using the latest version of Tomcat 9.0.16. There were some recent changes in this version of Tomcat.
However, we can resolve this issue with the following.
In your web.xml file, on line 8 add this entry
<absolute-ordering />
This should appear just after the <display-name>
entry.
For details on the <absolute-ordering>
tag see this link
And just for completeness, here's the full file for comparison
File: web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>spring-mvc-demo</display-name>
<absolute-ordering />
<!-- Spring MVC Configs -->
<!-- Step 1: Configure Spring MVC Dispatcher Servlet -->
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-mvc-demo-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Step 2: Set up URL mapping for Spring MVC Dispatcher Servlet -->
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
starting tomcat v9.0 server at localhost has encountered a problem
Thanks guys,finally found answer to my question here More than one fragment with the name [spring_web] was found. This is not legal with relative ordering ... i had to add <absolute-ordering />
tag to my web.xml just under the <display-name>
tag,now working fine.
"Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal
To resolve this issue, you have to delete the .snap
file located in the directory:
<workspace-directory>\.metadata\.plugins\org.eclipse.core.resources
After deleting this file, you could start Eclipse with no problem.
Related Topics
How to Send Date in Rest API in Post Method
Write to Text File from Multiple Threads
How to Test Code Dependent on Environment Variables Using Junit
How to Return a HTML Page from a Restful Controller in Spring Boot
How to Have Each Record of Json on a Separate Line
Error About Sun/Misc/Base64Encoder on Eclipse
Checking for Null on a Collection in Jpql Queries
How to Convert a Kotlin Source File to a Java Source File
Passing Multiple Variables in @Requestbody to a Spring MVC Controller Using Ajax
Java Regex to Validate Full Name Allow Only Spaces and Letters
Why Am I Getting the Error "The Method Is Undefined for the Type"
Flush/Clear System.In (Stdin) Before Reading
How to Convert Date Which I Got from Firebase Server as Am Getting Error Date
Base64: Java.Lang.Illegalargumentexception: Illegal Character