• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generic Servlet

 
mohamed zafer
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have used HTTPServlet, and I want to know the use of Generic servlets.
I have the following Questions.
Under what circumtances are Generic servlet used and How are they used.
Can Generic Servlet be used instead of HTTPServlet.
Any example code will be of great help to me.
Zafer
 
Ajan Balakrishnan
Ranch Hand
Posts: 71
 
mohamed zafer
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Ajan,
Thank you for your response. The links provided by give only the definition of the Generic servlet, but it would be better if you help me know how to use it. Consider suppose I am not using HTTP but I do want to use servlet, in that case how can I extend Generic Servlet.
 
Randall Twede
Ranch Hand
Posts: 4363
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think GenericServlet is implemented much. It is much more common to use sockets for non-http connection.
This is what the API says although I realize it is little help:
To write a generic servlet, you need only override the abstract service method.
 
Ranjit NATARAJAN
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http servlet mainly deals with http protocol implementation and hence when u r using http use this one
generic is for all protocols it does not have specific methods for http like doGet() and doPost() doHead() etc
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic