R4R Team working to provide free of cost for experienced and freshers

Tutorials | Examples|Interview Questions and Answers|Java Tutorials| C Tutorials | C++ Tutorials | Spring Tutorials| Hibernate Tutorials | JSP Tutorials | Servelets Tutorials| C# Tutorials | PHP Tutorials etc , Basics | Download Software | Data Types | Variables | Constant | Storage & Classes | Operators | Decisions Making | Loops | Functions| Numbers | Arrays | Pointers | String | Datastructure | Expressions | Preprocessor Statement | I/O | Exception Handling | OOPs Tutorial | Classes and object |C++ Inheritance Overloading | Polymorphism | Abstraction | Encapsulation | Interfaces | Multithreading etc

Java Servlet Programing Laungage

Java Servlet Projects

Servlet Project 3

Java Servlet :Implementation of GenericServlet
Previous Home Next

javax.servlet.GenericServlet:

This is an abstract class that implements servlet interface and defines all its method except service(). This class is used as a based class of user define servlets.

In web application HTTP protocol is used for communicating with clients and application. This protocol supports following type of requests:

  1. Get
  2. Post
  3. Head
  4. Trace
  5. Connect
  6. put
  7. delete
  8. option

get and post are used to request contents from the server and all other are used for connection setup and management.

Implementation of GenericServlet
public abstract class GenericServlet implements Servlet
{
	private ServletConfig config ; 
	public void init(ServletConfig config)
	{
		this.config=config;
		init();
	}
	public void init()
	{
	/*utility method that can be overrided by application developers
	to perform initialization*/
	}
	public void display()
	{}
	public ServletConfig getServletConfig()
	{
	return config ;
	}
}
Previous Home Next