日期:2014-05-17 浏览次数:20864 次
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String strName=null;
String strThing=null;
try{
strName=request.getParameter("name");
strThing=request.getParameter("thing");
if((strName==null)||(strName.length()==0)){throw new Exception("null strName");}
if((strThing==null)||(strThing.length()==0)){throw new Exception("null strThing");}
session.setAttribute("name",strName);
session.setAttribute("thing",strThing);
response.sendRedirect("display.jsp");
}
catch(Exception e){}
%>
<html>
<body>
<form action="" method="get">
<table>
<tr><td>名称:</td><td><input name="name" type="text" /></td></tr>
<tr><td>事件:</td><td><input name="thing" type="text" /></td></tr>
<tr><td align="right"></td>
<td><button type="submit">提交</button><button type="reset">重置</button></td></tr>
</table>
</form>
</body>
</html>