package com.yitong.struts.common; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.RequestProcessor; public class myrequest extends RequestProcessor { public boolean processPreprocess(HttpServletRequest request, HttpServletResponse response) { try { request.setCharacterEncoding("gb2312"); } catch (Exception e) { e.printStackTrace(); } return true; } }