<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<html>
<head>
<title>提交成功</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
response.setContentType("char/html;charset=UTF-8");
String name = request.getParameter("uname");
String title = request.getParameter("title");
String words = request.getParameter("words");
Date date = new Date();
SimpleDateFormat format = new SimpleDateFormat("YYYY-MM-DD hh:mm:ss");
String time = format.format(date);
List<String> list = new ArrayList<>();
list.add(name);
list.add(title);
list.add(time);
list.add(words);
session.setAttribute("list",list);
%>
你的信息已经提交成功!!<br>
<a href="http://localhost:8080/Jsp/留言板信息.jsp"style="color: brown;font-size: 20px">查看留言板</a><br>
<a href="http://localhost:8080/Jsp/留言板.jsp" style="color: brown;font-size: 20px">返回留言板</a>
</body>
</html>
这是success.jsp