可以遇到的问题——小窍门

1. 从cookie中根据key取出value,value是拼接的字符串,处理方法:

    ${cookie["order".concat(currProduct.pid)].value}


2.jsp中判断是否登陆

if("${sessionScope.user }"=="")//未登录


3.respond没有及时带过去cookie的解决方法(给页面直接写一段js脚本)

String new_url = "http://www.oschina.net/";
String html = "<script type='text/javascript'>location.href='"+new_url+"';</script>";
response.getWriter().print(html);



长期更新,未完待续……

猜你喜欢

转载自blog.csdn.net/chw0629/article/details/80545601