jose chiramal wrote:
1. Can a servlet have a constructor ? - my answer is yes.
Yes! check the
API
jose chiramal wrote:
2. is it mandatory that i should override the doGet() and doPost() methods ? Can I have a servlet(user defined servlet) without doGet() and doPost() methods ?
Then how do you communicate with the client?
jose chiramal wrote:
3 Suppose I have a userdefined servlet that extends HttpServlet what are the methods that I mandatorily need to override in my user defined servlet ?
I think, it depends on our requirements!
jose chiramal wrote:
4. When do we use ServletResponse and when do we use HttpServletResponse.
Check the servlet hierarchy!