Tomcat loading problem
After modifying the name of a class, use idea to automatically modify the name of this class. After modification, an error is reported:
Artifact storage:war exploded: Error during artifact deployment. See server log for details
Solution 1: regenerate the war package
1. In tomcat, delete the war package of the project
2. In idea -> Delete the war package in project settings and repackage it.
3. In tomcat, reload the war package
Method 2: regenerate the web xml
Check the log and find the web.inf under web-inf XML error. Delete web.XML, reconfigure 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_4_0.xsd"
version="4.0">
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:springmvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Similar Posts:
- [Solved] com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes
- [Solved] IDEA javaweb web.xml File Error: Invalid content was found starting with element
- [Solved] Warning: Servlet threw load() exception java.lang.ClassNotFoundException: org.glassfish.jersey.servlet…
- How to Solve Error: The content of element type “web-app” must match “(icon?display
- [Solved] Spring MVC cross server upload error: returned a response status of 405 method not allowed
- [Solved] IDEA: JSP Could Not Use session Build-in Object
- Struts 2.0 Error: The Struts dispatcher cannot be found (Error 500 Internal Server Error)
- Error 404 when accessing pictures in the project directory
- Spring MVC: How to Solve Chinese garbled code Issue
- import javax.servlet.http.HttpSession;