Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doConnect method

 
Manpreet S Singh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI doConnect method is not defined in HttpServlet abstract class. Can you tell where exactly it is defined.
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There�s no mechanism in the servlet API
for handling doConnect(), so it�s not part
of HttpServlet.

from HFSJ
 
Manpreet S Singh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so it is part of which API or class or exactly where it is defined.
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is NO doConnect method in Any of the API.

Please do Correct me if i am wrong.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not defined anywhere. What gave you the idea that it was?
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have Http methods called

GET
POST
HEAD
PUT
TRACE
DELETE
OPTIONS
CONNECT

All are having the doXXX methods in HttpServlet except Connect whcih is used for the purpose of tunnelling(to
pass servlet through firewall).

So it is not there in HttpServlet.It wont be there in Servlet API i guess.

You can check this thread

http://www.coderanch.com/t/364087/Servlets/java/HttpServlet-service-methods-doConnect

Please correct me if i am wrong.
 
Milind Patil
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The CONNECT method is reserved for tunneling purpose. Tunneling means connecting your proxy server to particular web server. The proxy server is responsible for SSL or TCP tunneling with webserver.

Through API, there is no way to send CONNECT request to webserver. Its Webserver's burden how to handle secure connection (e.g https or SSL). User has to just send data over request /response in textual form.

Example of an SSL tunneling request to host home.netscape.com, to HTTPS port (443):

CONNECT home.netscape.com:443 HTTP/1.0
User-agent: Mozilla/4.0

...data to be tunnelled to the server...


As per as, SCWCD exam is concerned, you need to worry about CONNECT method. Just keep in mind that, there is a http method called CONNECT and it is used for SSL or TCP tunneling.
[ August 11, 2008: Message edited by: Milind Patil ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic