request.setCharacterEncoding("GB2312");//必须在getParameter之前调用一次
String str = request.getParameter("user");//str已经是中文,不需要作其它的编码转换了。