Fixing Apache V9.0 Server Tomcat V9.0 Server At Localhost Failed to Start Error

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



Leave a reply



Submit