• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

protected members in HttpServlet

 
Leandro Oliveira
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the logic behind declaring most of the methods in javax.servlet.http.HttpServlet class???
thanks in advance!
 
Ryan Bailey
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you rephrase your question. I'm not quite understanding you? You do not have to define any of your methods if you are extending form the HttpServlet class. They already have dummy variables defined for you. If you are handling a POST method then overwrite the doPost method. If you are using the GET method overwrite the doGet. Make sure if you overwrite the service method you call super otherwise you will run into problems.
If this doesn't help please clarify your question.
Cheers
Ryan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic