写jsp连数据库遇到的问题
- web项目中链接数据库遇到
Unknown system variable 'query_cache_size'
在web.xml中加上
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.25</version> </dependency>
不同担心报错问题,直接运行!
- 在写Servlet的时候页面不报错,但是也不跳转,页面没有显示任何东西,需要在Servlet的dopost方法中写:
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request,response);
}
就可以跳转了