?? insert.jsp
字號:
<%-- Document : insert Created on : 2009-2-18, 13:54:15 Author : Administrator--%><%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><%@page import="java.util.*"%><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>留言管理系統(tǒng)——新增留言頁面</title> </head> <body> <center> <br> <h1>留言管理系統(tǒng)——JSP + MVC + DAO實現(xiàn)</h1> <hr> <br> <% if (session.getAttribute("p_name") != null) { // 用戶已登陸%> <%-- 加入更加詳細的錯誤提示 --%> <% if (request.getAttribute("errors") != null) { // 有錯誤,要進行打印輸出 List all = (List) request.getAttribute("errors"); Iterator iter = all.iterator(); while (iter.hasNext()) { %> <li><%=iter.next()%></li> <% } } %> <form name="form" action="NoteServlet?status=insert" method="POST"> <table border="0"> <thead> <tr> <th>添加新留言</th> <th><a href="logout.jsp">退出</a></th> </tr> </thead> <tbody> <tr> <td>標(biāo)題:</td> <td><input type="text" name="title" value="${note.title}" /></td> </tr> <tr> <td>作者:</td> <td><input type="text" name="author" value="${note.author}" /></td> </tr> <tr> <td>內(nèi)容:</td> <td><textarea name="content" rows="6" cols="20">${note.content} </textarea></td> </tr> <tr> <td></td> <td><input type="submit" value="添加" name="submit" /> <input type="reset" value="重置" name="reset" /></td> </tr> </tbody> </table> </form> <h3><a href="NoteServlet?status=quaryAll">回到留言列表頁</a></h3> <% } else { // 用戶未登陸,提示用戶登陸,并跳轉(zhuǎn) response.setHeader("refresh", "2;URL=login.jsp"); %> 您還未登陸,請先登陸!!!<br> 兩秒后自動跳轉(zhuǎn)到登陸窗口!!!<br> 如果沒有跳轉(zhuǎn),請按<a href="login.jsp">這里</a>!!!<br> <% } %> </center> </body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -