-
Servlet
-
ServletConfig
-
java.io.Serializable
Category Archives: Servlet
What are the methods of Filter Interface?
1. public void init(FilterConfig filterConfig)throws ServletException
2. public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws java.io.IOException,
ServletException
3. public void destroy()
servlet cookies in java
javax.servlet.http
Class Cookie
-
public class Cookie
-
extends java.lang.Object
-
implements java.lang.Cloneable
-
cookies are a small amount of information sent by a servlet to a Web browser,saved by the browser, and later sent back to the server. A cookie’s value can uniquely identify a client, so cookies are commonly used for session management.
-
A cookie contain a name, and a value.
-
The browser is expected to support 20 cookies.
-
The cookie size is 4 KB.
-
The cookie contains only one constructor
-
public Cookie(java.lang.String name, java.lang.String value)
some of the methods of cookies arepublic void setComment(java.lang.String purpose)
public java.lang.String getComment()
public void setDomain(java.lang.String pattern)
public java.lang.String getDomain()
public void setMaxAge(int expiry)
public int getMaxAge()
public void setPath(java.lang.String uri)
public java.lang.String getPath()
public void setSecure(boolean flag)
public boolean getSecure()
public java.lang.String getName()
public void setValue(java.lang.String newValue)
public java.lang.String getValue()
public int getVersion()
public void setVersion(int v)
public java.lang.Object clone()