标签:pack remove attribute port int long ssi invalid ext
package javax.servlet.http; import java.util.Enumeration; import javax.servlet.ServletContext; public interface HttpSession { public long getCreationTime(); public String getId(); public long getLastAccessedTime(); public ServletContext getServletContext(); public void setMaxInactiveInterval(int interval); public int getMaxInactiveInterval(); @Deprecated public HttpSessionContext getSessionContext(); public Object getAttribute(String name); @Deprecated public Object getValue(String name); public Enumeration<String> getAttributeNames(); @Deprecated public String[] getValueNames(); public void setAttribute(String name, Object value); @Deprecated public void putValue(String name, Object value); public void removeAttribute(String name); @Deprecated public void removeValue(String name); public void invalidate();
这是HttpSesion接口的代码,去掉了注释,方法没有几个,从中看setAttribute()的方法,看完这个方法就明白了,这是cookie的翻版。有几个弃用的方法,能用的方法并不是很多。
标签:pack remove attribute port int long ssi invalid ext
原文地址:https://www.cnblogs.com/Robin008/p/10201955.html