Solution to IDEA configuring Servlet: 500 at the beginning and 400 after refreshing

500 page error:

javax.servlet.ServletException: Exception when instantiating Servlet class [xxx.xxx.servlet.user.LoginServlet]

Refresh the page again and a 404 appears.

Solution :

Just change the Tomcat version to a lower version. I started with 10.0+ and later changed it to 9.0+. I personally tested it and it works! ! ! ! I wasted an hour trying to solve it. I looked at other people’s solutions but it didn’t work. This is my first time posting. I don’t know if it will be helpful to others~~

 

Guess you like

Origin blog.csdn.net/weixin_53154312/article/details/127099649