1,将IDEA工程导入Eclipse
1.1
1.2
1.3
1.4
2,连接MySql
MySql版本8.0,只能用JDK1.8
以下为TomcatServer启动时的错误:
Q:Data source rejected establishment of connection, message from server: “Too many connections”。
A:将my.ini中的最大连接数由151改为1000,重启MySQL。
Q:java.sql.SQLException: Unknown system variable ‘tx_isolation’
A:mysql-connector-java的版本太低,数据库的版本太高 因此将mysql-connector-java升级到最新版本就解决了问题。
Q:Unsupported major.minor version 52.0 (unable to load class com.mysql.jdbc.Driver)
A:确定JDK版本。
Q:The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration
A:增加时区参数:jdbc:mysql://localhost:3306/test?serverTimezone=UTC
3,JSP
3.1 jsp:include
include指令是静态包含:
<%@include file="head.jsp" %>
include行为是动态包含:
<jsp:include page="head.jsp"/>
3.2 c:forEach 循环
4, 步骤
创建实体,在数据库建表,编写DAO,测试DAO,抽取成DAO接口,编写JSP,编写JSP关联的Servlet。
参考:
1.https://www.jianshu.com/p/7f01e7354c65
2.https://www.jianshu.com/p/7ed5cd1e1a45