javax.servlet.http
The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
Interfaces:
HttpServletRequest : Extends the ServletRequest interface to provide request information for HTTP servlets.
HttpServletResponse : Extends the ServletResponse interface to provide HTTP-specific functionality in sending a response.
HttpSession : Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.
Classes:
Cookie : Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server.
HttpServlet : Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site.
Methods of HttpServletRequest:
public cookie[] getCookies()
public string getHeaders(String Name)
public HttpSession getSession()
Methods of HttpServletResponse:
public void addcookie(String name,String value)
public void addHeaders(String name,String value)
public void sendRedirect(String url)
Methods of HttpSession:
public void setAttribute(String name,Object value)
public Object getAttribute(String name)
Methods of Httpservlet:
public void service(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
public void doGet(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
public void doPost(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
More Servlet Topics :
The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
Interfaces:
HttpServletRequest : Extends the ServletRequest interface to provide request information for HTTP servlets.
HttpServletResponse : Extends the ServletResponse interface to provide HTTP-specific functionality in sending a response.
HttpSession : Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.
Classes:
Cookie : Creates a cookie, a small amount of information sent by a servlet to a Web browser, saved by the browser, and later sent back to the server.
HttpServlet : Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site.
Methods of HttpServletRequest:
public cookie[] getCookies()
public string getHeaders(String Name)
public HttpSession getSession()
Methods of HttpServletResponse:
public void addcookie(String name,String value)
public void addHeaders(String name,String value)
public void sendRedirect(String url)
Methods of HttpSession:
public void setAttribute(String name,Object value)
public Object getAttribute(String name)
Methods of Httpservlet:
public void service(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
public void doGet(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
public void doPost(HttpServletRequest,HttpServletResponse)
throws ServletException,IOException
More Servlet Topics :
- Introduction : Servlet Interface
- Java Package javax.servlet(Interfaces,Classes and Methods)
- Java Package javax.servlet.http (Interfaces,Classes and Methods)
- How to Create a Web Application using NetBeans and Apache Tomcat Server
- Basic Program using HttpServlet Class
- Basic Login Program using JSP and GenericSevlet class
- Login using JDBC,Servlet with NetBeans and Oracle
- SevletConfig Interface using JDBC,NetBeans 6.9 and Oracle 10g
- Validation on TextField using JavaScript and Print command using servlet on NetBeans
- ServletContext Interface
- RequestDispatcher Interface and SendRedirect() Method
- Session Tracking
- Session Tracking using Cookies
- Session Tracking using HttpSession Interface
- Session Tracking using URL Rewriting
- Session Tracking using Hidden Forms Field
- Sql Query Tool using Servlet
No comments:
Post a Comment