Servlet used for dynamic web development and Two package belong to it are following:
javax.servlet
javax.servlet.http
Defines methods that all servlets must implement.
A servlet is an Interface and a small Java program that runs within a Web server. Servlets receive and respond to requests from Web clients, usually across HTTP(HyperText Transfer Protocol).
To implement this interface, you can write a generic servlet that extends javax.servlet.GenericServlet or HTTP servlet that extends javax.servlet.http.HttpServlet.
This interface defines methods to initialize a servlet, to service requests, and to remove a servlet from the server. These are known as life-cycle methods and are called in the following sequence:
1.The servlet is constructed, then initialized with the init method.
2. Any calls from clients to the service method are handled.
3.The servlet is taken out of service, then destroyed with the destroy method, then garbage collected and finalized.
In addition to the life-cycle methods, this interface provides the getServletConfig method, which the servlet can use to get any startup information, and the getServletInfo method, which allows the servlet to return basic information about itself, such as author, version, and copyright.
More Servlet Topics :javax.servlet
javax.servlet.http
Defines methods that all servlets must implement.
A servlet is an Interface and a small Java program that runs within a Web server. Servlets receive and respond to requests from Web clients, usually across HTTP(HyperText Transfer Protocol).
To implement this interface, you can write a generic servlet that extends javax.servlet.GenericServlet or HTTP servlet that extends javax.servlet.http.HttpServlet.
This interface defines methods to initialize a servlet, to service requests, and to remove a servlet from the server. These are known as life-cycle methods and are called in the following sequence:
1.The servlet is constructed, then initialized with the init method.
2. Any calls from clients to the service method are handled.
3.The servlet is taken out of service, then destroyed with the destroy method, then garbage collected and finalized.
In addition to the life-cycle methods, this interface provides the getServletConfig method, which the servlet can use to get any startup information, and the getServletInfo method, which allows the servlet to return basic information about itself, such as author, version, and copyright.
- 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