Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SCWCD exam study kit: Note on page 35 and and HelloWorldServlet on page 8 don't match  RSS feed

 
Urs Wiss
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
On page 35 the author mentions, that if you override the service method in
your servlet class, you will lose the functionality provided by HttpServlet,
and the doXXX() methods will therefore not be called automatically and you
have to call it yourself. But the HelloWorldServlet on page 8, which overrides
the service method, doesn't call the doGet() method. Calling the doXXX()
method is therefore not always necessary?
Appreciate any feedback,
Urs
 
Paul Anilprem
Enthuware Software Support
Ranch Foreman
Posts: 4033
33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calling the doXXX methods is definitely not necessary. But if you have coded those methods, which you usually do, and if you have overridden the service() method, then you will need to call the doXXX methods yourself from the service method.
The HelloWorldServlet does not have doXXX methods so there is no need to call them.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!