Overriding this method to support a GET request also automatically supports an HTTP HEAD request. A HEAD request is a GET request that returns no body in the response, only the request header fields.
When overriding this method, read the request data, write the response headers, get the response's writer or output stream object, and finally, write the response data. It's best to include content type and encoding. When using a PrintWriter object to return the response, set the content type before accessing the PrintWriter object.
Sergey Baranov
Vishal Trivedi
Ranch Hand
Joined: Sep 05, 2011
Posts: 57
posted
0
Hi All,
This is my first reply so pkz excuse me for mistakes.
The doGet() and doPost methods are only supported by httpServlet.
So you can use them while creating an httpServlet
and the default implementation of these methods is that you get output saying that this method is not supported.