<%@?page?language="java"?contentType="text/html;?charset=UTF-8"
pageEncoding="UTF-8"%>
<%@?page?import="com.imooc.bean.Message"?%>
<%@?taglib?prefix="c"?uri="http://java.sun.com/jsp/jstl/core"?%>
<!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=UTF-8"?/>
<meta?http-equiv="X-UA-Compatible"?content="IE=9;?IE=8;?IE=7;?IE=EDGE"?/>
<title>內(nèi)容列表頁面</title>
<link?href="../Resource/css/all.css"?rel="stylesheet"?type="text/css"?/>
</head>
<body?style="background:?#e1e9eb;">
<form?action=""?id="mainForm"?method="post">
<div?class="right">
<div?class="current">
當(dāng)前位置:<a?href="javascript:void(0)"?style="color:?#6E6E6E;">內(nèi)容管理</a>
>?內(nèi)容列表
</div>
<div?class="rightCont">
<p?class="g_title?fix">
內(nèi)容列表?<a?class="btn03"?href="#">新?增</a> <a
class="btn03"?href="#">刪?除</a>
</p>
<table?class="tab1">
<tbody>
<tr>
<form?action="/MessageServlet"?method="get">
<td?width="90"?align="right">指令名稱:</td>
<td><input?type="text"?class="allInput"?value="${command?}"??name="command"/></td>
<td?width="90"?align="right">描述:</td>
<td><input?type="text"?class="allInput"?value="${description?}"?name="description"/></td>
<td?width="85"?align="right"><input?type="submit"
class="tabSub"?value="查?詢"?/></td>
</form>
</tr>
</tbody>
</table>
<div?class="zixun?fix">
<table?class="tab2"?width="100%">
<tbody>
<tr>
????<th><input?type="checkbox"?id="all"?onclick="#"/></th>
????<th>序號(hào)</th>
????<th>指令</th>
????<th>描述</th>
????<th>內(nèi)容</th>
</tr>
<c:forEach?items="${requestScope.messagelist?}"?var="message"?varStatus="status">
<tr?<c:if?test="${?status.index%2!=0}">style="background-color:#ECF6EE;"</c:if>>
<td><input?type="checkbox"?/></td>
<td>${status.index+1?}</td>
<td>${message.Command?}</td>
<td>${message.Description?}</td>
<td>
<a?href="#">修改</a>
<a?href="#">刪除</a>
</td>
</tr>
<tr>
<th><input?type="checkbox"?id="all"?onclick="#"?/></th>
<th>${status.index+1?}</th>
<th>${message.Command?}</th>
<th>${message.Description?}</th>
<th>${message.Content?}</th>
</tr>
</c:forEach>
</tbody>
</table>
<div?class='page?fix'>
共?<b>4</b>?條?<a?href='###'?class='first'>首頁</a>?<a?href='###'
class='pre'>上一頁</a>?當(dāng)前第<span>1/1</span>頁?<a?href='###'
class='next'>下一頁</a>?<a?href='###'?class='last'>末頁</a>?跳至 <input
type='text'?value='1'?class='allInput?w28'?/> 頁 ?<a
href='###'?class='go'>GO</a>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
package?com.imooc.bean;
public?class?Message?{
private?Integer?ID;
private?String?Command;
private?String?Description;
private?String?Content;
public?Integer?getID()?{
return?ID;
}
public?void?setID(Integer?iD)?{
ID?=?iD;
}
public?String?getCommand()?{
return?Command;
}
public?void?setCommand(String?command)?{
Command?=?command;
}
public?String?getDescription()?{
return?Description;
}
public?void?setDescription(String?description)?{
Description?=?description;
}
public?String?getContent()?{
return?Content;
}
public?void?setContent(String?content)?{
Content?=?content;
}
}
2017-09-03
怎么解決的,我也遇到了同樣的問題?
2017-07-17
已解決,thank