Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

override service()

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I override service() in servlet

Thanks,
aakash
 
Ameya Thakur
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can override the Service method.

Of course, you could override service directly (to "improve" performance by reducing the number of method calls)

If your servlet needs to handle both GET and POST identically, have your doPost method call doGet, or vice versa. Don't override service.

Regards

Ameya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic