db.properties中的配置如下:
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc\:mysql\://localhost\:3306/mydb?useUnicode\=true&characterEncoding\=UTF-8&zeroDateTimeBehavior\=convertToNull
jdbc.username=root
jdbc.password=root
jsp文件配置如下:
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'table.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0">
<tr height="20">
<td width="100" align="center">学生id</td>
<td width="200" align="center">学生名称</td>
<td width="100" align="center">学生性别</td>
<td width="100" align="center">学生年龄</td>
<td width="200" align="center">电话号码</td>
</tr>
<c:forEach var="StudentsPo" items="${index}">
<tr height="20">
<td width="100" align="center">${StudentsPo.id}</td>
<td width="200" align="center">${StudentsPo.name}</td>
<td width="100" align="center">${StudentsPo.sex}</td>
<td width="100" align="center">${StudentsPo.age}</td>
<td width="200" align="center">${StudentsPo.tel}</td>
</tr>
</c:forEach>
</table>
</div>
</body>
</html>
告警如下:
DEBUG [http-nio-8080-exec-14] - DispatcherServlet with name 'springmvc' processing POST request for [/HelloWorld/queryStudentsPo.action]
DEBUG [http-nio-8080-exec-14] - Looking up handler method for path /queryStudentsPo.action
DEBUG [http-nio-8080-exec-14] - Did not find handler method for [/queryStudentsPo.action]
WARN [http-nio-8080-exec-14] - No mapping found for HTTP request with URI [/HelloWorld/queryStudentsPo.action] in DispatcherServlet with name 'springmvc'
DEBUG [http-nio-8080-exec-14] - Successfully completed request
DEBUG [http-nio-8080-exec-14] - Returning cached instance of singleton bean 'sqlSessionFactory'
jar包完全一样
jdk我是1.8,他是1.6
然后我用的eclipse的mars,他用的myeclipse
运行之后,完全不读取数据库,我把端口号和数据库名删了依旧报这个错,在别的电脑上可以运行,实在不知道哪块出了问题,求大神解决
Url映射有问题,看那个warn