What are the difference between HttpServlet and
GenericServlets?
Answers were Sorted based on User's Feedback
Answer / himanshu verma
Generic Servlet is the general class to implement servlets.
it can use any protocol like MIME, SMTP etc. while HTTP
Servlet is specially designed for HTTP protocol.
| Is This Answer Correct ? | 2 Yes | 0 No |
The diff is that inGeneracicServlet we had to implement the
service()method the GenericServlets service() method is
declared as abstract.But the Generic Servlet is not
implementing keeping the HttpSErvers in mind. Methods we
have in this class are
init()
log()
service()
While implementing the HTTP Servlet the service() method is
already implemented .service()method of HTTP sevlet is
declared as protected.the HTTPServlet is implementing
keeping the HttpSErvers in mind. Methods we have in this
class are
doGet(),doDelete(),doPost()
| Is This Answer Correct ? | 3 Yes | 6 No |
How do you track a user session in servlets?
Explain the difference between servlet and cgi?
How to get the server information in a servlet?
which method in doGet or doPost is use to send binary date to server
when you comppile the servlet is it neccesary to restaet the tomcat server?
Is it possible to have a constructor inside the servlet?
Who is responsible to create the object of servlet?
if u havea .class file ,how can u say whether it is servlet or not ,dont use java decompliler
Name the different ways of session tracking.
how to pass parameter from servlet to html form
What is Difference between JavaBeans and taglib directives?
What is the major difference between servlet and applet?