均按utf-8编码
<%@ page contentType="text/html; charset=utf-8" >
发送页面
str=java.net.URLEncoder.encode(str,"UTF-8");
response.sendRedirect("error.jsp?errorMessage="+str);
接收页面
request.setCharacterEncoding("utf-8");
String errorMessage=request.getParameter("errorMessage");