java解决传参乱码

当java在传参乱码时,可使用以下方法:

HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
title = new String( request.getParameter("title").getBytes("8859_1"), "utf8" );

 

 

【版权声明】转载请注明出处 http://www.cnblogs.com/hsjava1/p/8694760.html

posted @ 2018-04-02 16:26  扎王爷  阅读(702)  评论(0编辑  收藏  举报