The problem of page blank after servlet jump
Servlet code
report errors
ava.lang.ClassNotFoundException: com.mysql.jdbc.Driver exception
Reason: it has nothing to do with the above code,
The real reason is that the MySQL jar package was not imported into Tomcat. His grandmother found this problem for a long time and almost died
Now let’s show a wave of operation
1. Open Tomcat configuration,
2. Enter the favorite Guide Package link
Everyone’s lib directory is stored in different locations here. Anyway, you need to import the MySQL package into the Lib directory,
If you find that you don’t have this package, we’ll copy and paste it online or copy it in the Maven project
The main reason is that the MySQL package is not imported into tomcat, which leads to such an error
Similar Posts:
- Java.lang.classnotfoundexception: com.mysql.cj.jdbc.driver can’t find jar package, path problem
- The following table: unable to import javax. Servlet. HttpServletRequest
- import javax.servlet.http.HttpSession;
- Tomcat Deployed Applications Start Error: java.lang.ClassCastException: [XXX].filter.CharacterEncoding cannot be cast to jakarta.servlet.Filter
- [Solved] IDEA: JSP Could Not Use session Build-in Object
- [Solved] RuntimeError: Model class apps.users.models.UserProfile doesn’t declare an explicit app_label and isn’t in an application in INSTALLED_APPS.
- Tomcat10 Error: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
- Tomcat Startup Error: Server Tomcat v8.5 Server at localhost failed to start.
- Using Tomcat 10 to build a servlet, an error is reported: class XXX is not a servlet
- [Solved] Spring Error: Artifact spring:war exploded: Error during artifact deployment. See server log for details