代码:ActionContext.getContext().getSession().put("**", **);
注意点:放置的若为对象则在对象实体类中需要序列化——>
public class User implements java.io.Serializable {
...
}
本文介绍如何在ActionContext中使用getSession()方法将对象存入Session,并强调了当存储对象时,该对象所在的类需实现java.io.Serializable接口以支持序列化。
代码:ActionContext.getContext().getSession().put("**", **);
注意点:放置的若为对象则在对象实体类中需要序列化——>
public class User implements java.io.Serializable {
...
}
4438

被折叠的 条评论
为什么被折叠?
&spm=1001.2101.3001.5002&articleId=81178342&d=1&t=3&u=8a825a8f9fe94fdd8e329080cdfc92d0)