帮我看看为什么错了吧!谢谢了。。。
<%@ page language="java" import="java.util.*"contentType="text/html; charset=utf-8"%>
<%@page import="dto.LiuyanDto"%>
<%@page import="dto.LeaveworduserDto"%>
<%@taglib prefix="c" uri="http://java.
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'liuyancontent.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">
-->
<script type="text/javascript">
function gotoDel(liuyan_id) {
var res = window.confirm("你真的要删除 吗?");
if (res)
window.location = "<%=basePath%>DeleteServlet?Liuyan_id=" + liuyan_id;
}
</script>
</head>
<body>
<div style="width: auto; text-align: center;">
<div style="border: 2 solid silver; padding: 20px; width: 80%;"
align="center">
<th style="font-size: 34px; background-color: fuchsia; color: gray;">
<a href="<%=basePath%>liuyan.html">登陆
</a>
<a href="<%=basePath%>Regl.html">注册 </a>
<!--<form action="liuyan.html" onsubmit="return true">
<input type="submit" value="登陆">
<input type="submit" value="注册">
</form>
--><br>
</th>
</div>
<div style="border: 1 solid silver; padding: 20px; width: 80%;"
align="center">
<table border="0" align="center" cellspacing="0"
bordercolorlight="#D1D1D1" bordercolordark="#ffffff"
bgcolor="#dddddd" width="100%">
<tr>
<th
style="font-size: 24px; background-color: fuchsia; color: gray;">
留言信息列表
</th>
</tr>
<%
//下面的方法是用EL表达式的方式将时间显示出来
//pageContext.setAttribute("time",dto.getLiuyan_time());
%>
<c:if test="${!empty liuyan }">
<c:forEach items="${requestScope.liuyan}" var="dto"
varStatus="liu">
<tr>
<td style="padding-top: 10px; color: red; font-size: 12px;">
<div>
<div style="float: left; padding-left: 30px;">
第 ${liu.index+1}楼 ${dto.Liuyan_ip}
</div>
<div style="float: right; padding-right: 30px;">
用户:${dto.Liuyan_name}
</div>
</div>
</td>
</tr>
<tr>
<td
style="padding: 15px 20px; letter-spacing: 3px; font-size: 12px">
<p>
时间${dto.Liuyan_time}
</p>
<!--利用函数将留言时间显示出来-->
</td>
</tr>
<tr>
<td style="font-size: 12px;">
<div style="float: right; padding: 30px, 20px;">
<c:if test="${sessionScope.userinfo!=null}">
<c:if test="${sessionScope.userinfo.name eq dto.name}">
<a
href="<%=basePath%>DeleteServlet?Liuyan_id=${dto.Liuyan_id}">删除</a>
<br>
<br>
<a
href="<%=basePath%>FindExditServlet?Liuyan_id=${ dto.Liuyan_id}">编辑</a>
</c:if>
</c:if>
</div>
</td>
</tr>
<tr>
<td style="padding: 15px 20px; letter-spacing: 3px;">
<p>
${ dto.Liuyan_content}
</p>
</td>
</tr>
<tr>
<td style="background-color: gray; height: 5px;"></td>
</tr>
</c:forEach>
</c:if>
<tr>
<td style="padding-top: 10px; color: red;"></td>
</tr>
<tr>
<td style="padding: 15px 20px; height: 50px; color: red;">
对不起,还没有人在此留言!
</td>
</tr>
<tr>
<td align="right"
style="padding-right: 30px; padding-bottom: 20px;"></td>
</tr>
<tr>
<td style="background-color: gray; height: 5px;">
</td>
</tr>
<tr>
<td style="height: 50px; background-color: lime">
<div style="padding-left: 20px;">
总共有 ${totalResultNum} 条记录, 共计 ${totalPageNum} 页, 当前显示的是第
${currentPageNo} 页
</div>
<div style="text-align: right; padding-right: 30px;">
<a href="<%=basePath%>ContentServlet?PageNo=1">首页</a>
<a href="<%=basePath%>ContentServlet?PageNo=${currentPageNo-1}">上一页</a>
<a href="<%=basePath%>ContentServlet?PageNo=${currentPageNo+1}">下一页</a>
<a href="<%=basePath%>ContentServlet?PageNo=${totalPageNum}">尾页</a>
</div>
</td>
</tr>
</table>
</div>
<div style="border: 1 solid silver; padding-left: 20px; width: 80%;"
align="left"">
<p>
<font style="color: green;">
<c:if
test="${empty sessionScope.userinfo }">
欢迎:游客! </c:if>
<c:if
test="${!empty sessionScope.userinfo}">
欢迎你:${sessionScope.userinfo.name}
</c:if> </font>
</p>
请输入留言:
<br>
<form action="<%=basePath%>InsertContent" method="post">
<textarea rows="6" cols="90" name="Liuyan_content"></textarea>
<br>
<input type="submit" value=" 提交消息 ">
</form>
</div>
</div>
</body>
</html>
错误报告是:
严重: Servlet.service() for servlet jsp threw exception
javax.el.PropertyNotFoundException: Property 'Liuyan_ip' not found on type dto.LiuyanDto
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:214)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:191)
at javax.el.BeanELResolver.property(BeanELResolver.java:300)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:81)
at javax.(CompositeELResolver.java:54)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:938)
at org.apache.jsp.liuyancontent_jsp._jspService(liuyancontent_jsp.java:180)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at control.ContentServlet.doPost(ContentServlet.java:59)
at control.ContentServlet.doGet(ContentServlet.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)