When xiaomengxin was learning to deploy applications on the Java Web, he found that the console could not normally connect to the MySQL database, but it was always normal when using the idea test. Looking at the Tomcat startup log, he found that there was an error message. Through comparison, he found that tomcat9 was configured in the idea and tomcat10 was installed on the server, Baidu knows that the servlet package of tomcat10 and later has changed and needs to be imported into Jakarta servlet.* Replace javax.XML with a new package servlet.* Or directly replace it with tomcat9 version to avoid this error.
Error screenshot:
Similar Posts:
- Tomcat10 Error: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
- [Solved] IDEA: JSP Could Not Use session Build-in Object
- Using Tomcat 10 to build a servlet, an error is reported: class XXX is not a servlet
- import javax.servlet.http.HttpSession;
- [Solved] Tomcat10 Error: jakarta.servlet.ServletException: Class com.kuang.servlet.HelloServlet is not a servlet
- Error reporting when importing Maven project from MyEclipse
- The following table: unable to import javax. Servlet. HttpServletRequest
- Using idea and maven, there is an error: (4, 21) Java: there is no problem with the package javax.servlet
- Error during artifact deployment. See server log f
- HTTP Status 500 – Unable to compile class for JSP settlement program