• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling the non-HTTP protocol request

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
The servlet class that extends the class javax.servlet.http.HttpServlet will serve the request that is from the HTTP protocol, but will it handle the request from other Protocol.

if it can handle why it is so?

if it can't what changes i need to do to support the request from any other protocols.

And also list some of the non-HTTP protocol.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parameswaran Thangavel:
hi all
The servlet class that extends the class javax.servlet.http.HttpServlet will serve the request that is from the HTTP protocol, but will it handle the request from other Protocol.

if it can handle why it is so?

if it can't what changes i need to do to support the request from any other protocols.

And also list some of the non-HTTP protocol.


I have never seen any requirement in servlets to handle non-http protocol. But the service method can handle other than http protocol.
few Non http protocols are ftp and SNMP.
have any users in this forum have used a servlet for non-http protocol? if yes, on what functional requirement?
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For different protocols you would extend GenericServlet instead of HttpServlet. Of course, you'd need to have a servlet container that can handle other protocols; I'm not aware that there is one.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, thats what I meant. Use the service method in GenericServlet. But have any users felt any need to use non-http protocol in Servlet?
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I searched and found out that when a socket connection uses a servlet, the connection can be other than HTTP, like FTP. If the socket is trying to connect through FTP, then if HTTPServlet is used, it will err out. In that case the servlet has to be using ftp.
Can anyone tell me if this is good enough for a servlet to be supporting other than ftp protocols? or is there is any other instance where servlet needs to handle other than http protocol?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic