posted 14 years ago
You have to override atleast anyone of the eight methods (doGet(), doPost(),doDelete(), doOptions(), doPut(), doHead(), doOptions(), doHead()) in your servlet depending on purpose of the servlet. But the most commonly used methods are doGet(), doPost().
If you are calling the servlet from a HTML you can define the method that has to be called in the servlet in the method attribute of form tag. Default is doGet().
Well you don't have to care about when to use the methods in the ServletResponse or when not to, because we are dealing with HTTP we only use HttpServletResponse, which inherits ServletResponse.