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: Taramar Moogujind
Country: Portugal
Language: English (Spanish)
Genre: Photos
Published (Last): 27 June 2008
Pages: 45
PDF File Size: 15.90 Mb
ePub File Size: 5.72 Mb
ISBN: 174-3-27487-930-8
Downloads: 41503
Price: Free* [*Free Regsitration Required]
Uploader: Moogulabar

Serializable GenericServlet defines a generic, protocol-independent servlet. Stack Overflow works best with JavaScript enabled. Notify me of follow-up comments by email. Moreover, public abstract class GenericServlet extends java. Moreover, it is possible to write a Servlet generidservlet three methods: Post as a guest Name.

Similar Threads

Observe the hierarchy and understand the relationship between the three involved in multilevel inheritance. A programmer who extends the GenericServlet class should override the service method and write the implementation for it.

Servlets are platform-independent server-side components, being written in Java. Setter Injection-i am explaning through example hope users like this explaination Suppose we have Class Hello and Class Hello having 4 pro Immediate super class of HttpServlet is GenericServlet.


Container create one or more servlet instance depending on which servlet model genericsrrvlet are using.

The other four methods fifference from the Servlet interface have implementations in GenericServlet. It contains 5 abstract methods and all inherited by GenericServlet and HttpServlet. GenericServlet is protocol independent. However there are some exemptions for which the landowner will not be held accountable, such as: Nowadays Java has tons of job opportunities on various vertical industry.

Anonymous 6 August at That is; a method inherited from the Servlet interface called the service is an abstract method in GenericServlet.

GenericServlet class is direct subclass of Servlet interface. When it comes to the Spring Framework and Java, Dinesh tops the list! Ltd and was the first developer in his previous company, Paytm.

Share to Twitter Share to Facebook.

Servlet vs GenericServlet vs HttpServlet

A prime difference between GenericServlet and HttpServlet is that the GenericServlet is protocol-independent while the HttpServlet is protocol-dependent. HttpServlet can forward and include and redirect a request.

Servlet is interface, it defines methods for all the implementations – that’s what interfaces usually do. HttpServlet belongs to javax. Object, and implements Servlet, ServletConfig, and, java.


Difference Between GenericServlet and HttpServlet? ~ Java Forecast 4u

Umesh Prajapati 19 October at GenericServlet provides simple versions of the life-cycle methods init and destroy and of the methods in the ServletConfig interface. Notify me of new posts by email.

Servlet is a server-side web technology. Today most web xifference use HTTP protocol. It is the super interface for the remaining two — GenericServlet and HttpServlet.

What is the Difference Between GenericServlet and HttpServlet

Anoushka Sakthi 26 November at Write a java program to find largest number from four number. It is really helpful for a newbie like me.

Dinesh has been a Spring enthusiast since and is a Pivotal Certified Spring Professional, an author of a book Spring 5 Design Pattern, and a blogger.