Quantcast
Channel: 蜗牛都知道
Viewing all articles
Browse latest Browse all 105

sae cookies的问题

$
0
0

cookie.setDomain(“/”);

java.lang.IllegalArgumentException: path must start with /test or /(number)/test

at com.sina.sae.facade.SaeHttpServletResponse.addCookie(SaeHttpServletResponse.java:126)

at com.naxsu.utils.CookieUtil.setCookie(CookieUtil.java:77)

解决方法1.

使用cookie.setDomain(“test.sinaapp.com”);

解决办法2.

cookie的path设置成/1/test 不要设置成/

拿cookie的时候也需要带上/1/test

如应用名为test,页面为index.jsp

url应该为 http://test.sinaapp.com/1/test/index.jsp


Viewing all articles
Browse latest Browse all 105

Trending Articles