A页是静态页
<html>
<head>
<title>发表</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<body>
<form action="affirm.jsp" method="post">
标题:<input type="text" name="title" /><br/>
内容:<textarea rows="5" cols="20" name="content"></textarea><br/>
<input type="submit" value="提 交" />
</form>
</body>
</html>
B页JSP跳转页
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
request.setCharacterEncoding("GBK");
response.setCharacterEncoding("GBK");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String title = request.getParameter("title");
String content = request.getParameter("content");
%>
<html>
<head>
<base href="<%=basePath%>">
<title>确认</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">
</head>
<body>
<table>
<tr>
<td>标题:</td><td><%=title %></td>
</tr>
<tr>
<td>内容:</td><td><%=content %></td>
</tr>
</table>
<input type="text" value="<%=title %>"/><br/>
<textarea rows="5" cols="20"><%=content %></textarea>
</body>
</html>
温馨提示:内容为网友见解,仅供参考