📄 update.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<html>
<head>
<title>Struts+DAO 留言管理程序——登陆</title>
</head>
<body>
<center>
<h1>
留言管理范例 —— Struts + DAO实现
</h1>
<hr>
<br>
<logic:present name="uname" scope="session">
<logic:present name="note" scope="request">
<html:form action="note.do" method="post">
<table>
<tr>
<td colspan="2">
编辑留言
</td>
</tr>
<tr>
<td>
标题:
</td>
<td>
<html:text property="title" value="${note.title}"></html:text>
</td>
</tr>
<tr>
<td>
作者:
</td>
<td>
<html:text property="author" value="${note.author}"></html:text>
</td>
</tr>
<tr>
<td>
内容:
</td>
<td>
<html:textarea property="content" rows="6" cols="30"
value="${note.content}"></html:textarea>
</td>
</tr>
<tr>
<td colspan="2">
<input type="hidden" name="id" value="${note.id}">
<input type="hidden" name="status" value="update">
<input type="submit" value="更新">
<input type="reset" value="重置">
</td>
</tr>
</table>
</html:form>
</logic:present>
<logic:notPresent name="note" scope="request">
没有发现,要更新的内容!!
<br>
请确认要更新的留言是否存在!!
<br>
</logic:notPresent>
<h3>
<a href="note.do?status=selectall">回到留言列表页</a>
</h3>
</logic:present>
<logic:notPresent name="uname" scope="session">
<%
// 用户未登陆,提示用户登陆,并跳转
response.setHeader("refresh", "2;URL=login.jsp");
%>
您还未登陆,请先登陆!!!
<br>
两秒后自动跳转到登陆窗口!!!
<br>
如果没有跳转,请按
<a href="login.jsp">这里</a>!!!
<br>
</logic:notPresent>
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -