Site Loader

Before going for differences, first let us see how the three Servlet, Observe the hierarchy and understand the relationship between the three. The main difference between GenericServlet and HttpServlet is that the GenericServlet is protocol independent and can be used with any. hi whats the main difference between Generic & httServlet??.

Author: Kazigar Kelrajas
Country: Angola
Language: English (Spanish)
Genre: Environment
Published (Last): 8 October 2013
Pages: 329
PDF File Size: 16.74 Mb
ePub File Size: 19.82 Mb
ISBN: 921-7-60303-934-6
Downloads: 71569
Price: Free* [*Free Regsitration Required]
Uploader: Tauzshura

GenericServlet class is direct subclass of Servlet interface. So, if you extend HttpServlet, you can get the functionality of both. You may create a generic servlet by inheriting the GenericServlet class and providing the implementation of the service method.

Also, in GenericServlet, the service method is abstract. HttpServlet gives a blueprint for Http servlet and makes writing them easier. Furthermore, the immediate superclass of HttpServlet is GenericServlet. It provides simple versions of the lifecycle methods init and destroy and of the methods in the ServletConfig interface. Other 4 abstract methods are implemented in this class.

In this class, one abstract method exist: Anonymous 2 May at It contains 5 abstract methods and all inherited by GenericServlet and HttpServlet. Thus, this is another important difference between Differenve and HttpServlet. Sign up using Facebook. Generucservlet Pal 15 April at As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.

GenericServlet is the immediate subclass of Servlet interface. GenericServlet provides simple versions of the life-cycle methods init and destroy and of the methods in the ServletConfig interface. All the classes and interfaces present in javax. With HttpServlet extension, service method can be replaced by doGet or doPost with the same parameters of service method.


The driver’s licensing exams in all stated require that drivers pass a vision test, but they do nothing to test for reaction speed.

I am a regular follower of your blog. Servlets are platform-independent httservlet components, being written in Java. Immediate super class of HttpServlet is GenericServlet.

GenericServlet is the basic, protocol-neutral implementation of the Servlet interface. GenericServlet is protocol independent, it means it can accept any protocol request. Other 4 abstract methods of Servlet interface are given implementation given body.

The information that you shared with us is very useful and thanks for sharing.

Servlet vs GenericServlet vs HttpServlet

Ltd and was the first developer in his previous company, Paytm. Are you asking when you’d use any of those? It is a callback method called htrpservlet.

Moreover, it is possible to write a Servlet using three methods: Eventhough the HttpServlet does not contain any abstract methods, it is declared as abstract class by the Designers to not to allow the anyone to create an object directly because a Servlet object is created by the Servlet Container.

Use doPost, doGet method instead of service method. Object implements Servlet, ServletConfig, java. Serializable GenericServlet defines a generic, protocol-independent servlet. Here we explain how to write a program to sort the give string.


Anonymous 15 November at If anyone wants to become a Java developer learn from Java Training in Chennai.

It has a series of articles related to Java technologies. Yes, the abstract method service of GenericServlet is overridden by HttpServlet.

difference between genericServlet & httpServlet (Servlets forum at Coderanch)

Anonymous 11 June at However, in Genericserblet, the service method is non-abstract. To write a servlet, everyone goes to extend the abstract class HttpServletlike Frame is required to extend to create a frame.

Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. This answer is taken from javapapers.

What is the Difference Between GenericServlet and HttpServlet

To know more detils about the course visit this website. Leave a Reply Cancel reply Your email address will not be published. Jalak Patel 29 April at HttpServlet does not contain any abstract method. Anonymous 25 February at He is currently working as a genericervlet manager at a leading product and web development company.

Generic Servlet is protocol independent.

Object implements Servlet, ServletConfig, java. Stop by my web page; newspaperarchive.