在数据库查到了数据,向页面添加时404,路径是对的(我没有配置试图解析器,尝试配置后仍然404),controller也执行了,求教是什么原因
controller代码
后台log
jsp代码如下
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!-- <meta http-equiv="refresh" content="3000" url="/newsList.action"/> -->
<title>Insert title here</title>
</head>
<body>
<form action="${pageContext.request.contextPath }/news.action" method="get">
<input type="submit" id="ss">
商品列表:
<table width="100%" border=1>
<tr>
<td>链接</td>
<td>标题</td>
<td>生产日期</td>
<td>商品描述</td>
<td>操作</td>
</tr>
<c:forEach items="${NewsList }" var="item">
<tr>
<td>${item.news_href }</td>
<td>${item.news_title }</td>
<td>${item.detail }</td>
<td><a href="${pageContext.request.contextPath }/itemEdit.action?id=${item.id}">修改</a>
</td>
</tr>
</c:forEach>
</table>
</form>
</body>
</html>