日期:2014-05-17 浏览次数:20892 次
<%@page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head><title>表单页面</title></head>
<body>
<form name="loginForm" action="secondDemo.jsp" method="post">
<input type="text" name="userName" />
<input type="submit" value="提交"/>
</form>
</body>
</html>
<%@page contentType="text/html charset=UTF-8"%>
<%@page import="java.util.Map"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>第二个Demo</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
%>
<%=request.getParameter("userName")%>
</body>
</html>