websphere 下cookie文件问题.高手速进.跪谢
小弟遇到非常郁闷的问题.在tomcat下cookie文件读写都没有问题.但工程一放到websphere下.连cookie文件都生成不了啦.真搞不懂websphere到底有啥不同.
望高手给个思路.
下面是代码:
public static void addCookie(String name, String value)
{
int maxAge = 3600 * 24 * 365;//365 days
if (value == null) {
maxAge = 0;
value = "";
}
Cookie cookie = new Cookie(name, value);
cookie.setMaxAge(maxAge);
cookie.setPath("/");
JForumExecutionContext.getResponse().addCookie(cookie);
}
代码本身没有问题.因为在tomcat下正常.