当前位置: 代码迷 >> J2EE >> el表达式中获取cookie的有关问题
  详细解决方案

el表达式中获取cookie的有关问题

热度:232   发布时间:2016-04-22 02:32:27.0
el表达式中获取cookie的问题
我的servlet中的代码是这样子的
Cookie cookie=new Cookie("username",new String(name.getBytes("iso8859-1")));
在jsp页面中,
 ${cookie.username.value}
但是页面里获得的值是乱码,这个怎么去解决,请求提供在el表达式里解决的办法,

------解决方案--------------------
你在获取的时候能不能进行转码啊?el表达式好像不支持转码的!
  相关解决方案