test.html
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PROTOTYPE POST</title>
<script language="javascript" type="text/javascript" src="js/prototype.js"></script>
</head>
<body>
<script type="text/javascript">
function postNewContact(){
var form = $(’form’);
var url='result.jsp';
var myAjax = new Ajax.Request(url,{method:'post',
parameters: Form.serialize(form),
onComplete:showResponse});
}
function showResponse(originalRequest){
alert(originalRequest.responseText);
}
</script>
<form method="post" id="form" name="form">
<input type="text" name="act">
<input onclick="postNewContact();" name="pbut" type="button" value="POST" />
</form>
</body>
</html>
result.jsp
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%=request.getParameter("act")%>
prototype提交为utf-8编码