DIFFERENCE BETWEEN GENERICSERVLET AND HTTPSERVLET PDF

DIFFERENCE BETWEEN GENERICSERVLET AND HTTPSERVLET PDF

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: Kazralkis Vizuru
Country: Yemen
Language: English (Spanish)
Genre: Finance
Published (Last): 26 September 2012
Pages: 289
PDF File Size: 4.17 Mb
ePub File Size: 14.2 Mb
ISBN: 440-1-72183-540-5
Downloads: 61438
Price: Free* [*Free Regsitration Required]
Uploader: Golabar

GenericServlet class is direct subclass of Servlet interface. More exact information you can find behind the links. A prime difference between GenericServlet and HttpServlet is that the GenericServlet is protocol-independent while the HttpServlet is protocol-dependent. It is really helpful for a newbie like me. Other 4 abstract methods of Servlet interface are given implementation given body. Biram Pal 15 April at Dinesh is passionate about the latest Java technologies and loves to write technical blogs related to it.

GenericServlet is the immediate subclass of Servlet interface. GenericServlet gives a blueprint and makes writing servlet easier.

Also, in GenericServlet, the service method is abstract. Mary Brown 12 October at Object implements Servlet, ServletConfig, java. Only one object is created first time when first request comes, other request share the httppservlet object.

  CUADRO MEDICO ASISA MADRID 2012 PDF

What is the Difference Between GenericServlet and HttpServlet

Jalak Patel 29 April at A programmer who extends the GenericServlet class should override the service method and write the implementation for it. GenericServlet also implements the log method, declared in the ServletContext interface. GenericServlet makes writing servlets easier. It handles only http protocol.

Difference Between GenericServlet and HttpServlet

Anonymous 14 April at Serializable GenericServlet defines a generic, protocol-independent servlet. Moreover, it is possible to write a Servlet using three methods: Kiran Mohan Reddy B 8 November at So, if you extend HttpServlet, you can get the functionality of both.

Rony 2 5 Today most web applications use HTTP protocol. Setter Injection-i am explaning through example hope users like this explaination Suppose we have Class Hello and Class Hello having 4 pro Did you read it? Object implements Servlet, ServletConfig, java.

The immediate super class of HttpServlet is GenericServlet. Anoushka Sakthi 26 November at 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.

It is the immediate subclass of Servlet interface. HttpServlet, on the other hand, is the immediate subclass of GenericServlet. Still better way is extending Generiservlet and need not to override any methods as HttpServlet contains no abstract methods. Share to Generixservlet Share to Facebook.

  JAXON22 HELP WANTED PDF

Veera Reddy 24 March at Varshil Patel 21 1. To write a generic servlet, it is sufficient to override the abstract service method. This answer is taken from javapapers. By using our site, you acknowledge that annd have read and understand our Cookie PolicyPrivacy Policy genericservlef, and our Terms of Service. GenericServlet provides simple versions of the lifecycle methods init and destroy and of the methods in the ServletConfig interface. HttpServlet overrides the service method in GenericServlet.

Difference between GenericServlet and HttpServlet – Dinesh on Java

GenericServlet is protocol independent, it means it can accept any protocol request. Before going for differences, first let us see how the three DkfferenceGenericServletHttpServlet are related, their signatures and also at the end similarities. Object implements Servlet, ServletConfig, java. In this class, one abstract method exist: With the observation, a conclusion can be arrived, to write a Servlet three ways exist.