1.jsp
<%@ page contentType="text/html; charset=gb2312" %>
<html><form name = "1" action="2.jsp" method = post>
<%
HttpSession se=request.getSession(true);
se.setAttribute("aa","1");%>
<table><tr>
<td align=center><input type="text" name="text" value=""></td>
</tr>
<tr><td align = center><input type="submit" name="submit" ></tr>
</table>
</html>
2.jsp
<html>
<% HttpSession se= request.getSession();
String s = se.getId();String a = (String)(se.getAttribute("aa")); %><table><tr>
<td align=center><input type="text" name="text" value = <%=s%>></td>
</tr>
</table>
</html>
<%@ page contentType="text/html; charset=gb2312" %>
<html><form name = "1" action="2.jsp" method = post>
<%
HttpSession se=request.getSession(true);
se.setAttribute("aa","1");%>
<table><tr>
<td align=center><input type="text" name="text" value=""></td>
</tr>
<tr><td align = center><input type="submit" name="submit" ></tr>
</table>
</html>
2.jsp
<html>
<% HttpSession se= request.getSession();
String s = se.getId();String a = (String)(se.getAttribute("aa")); %><table><tr>
<td align=center><input type="text" name="text" value = <%=s%>></td>
</tr>
</table>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货