摘要:就是在一个JSP页面接收ActionForm的属性时,如果输入的是中文,那么在ActionForm接收后会是乱码解决方案有2个:1.在Action类中解决,这个我试过,不可行2.在ActionForm中解决,这个我试过,可行,而且很方便在ActionForm中的reset方法中加入如下代码即可,可输出英文或中文public void reset(ActionMapping mapping, HttpServletRequest request) { try { request.setCharacterEncoding("GBK"); } catch (Exception e
阅读全文