This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doService calls doGet but if it is not defined? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doService calls doGet but if it is not defined?" Watch "doService calls doGet but if it is not defined?" New topic
Author

doService calls doGet but if it is not defined?

Jagdeep gupta
Greenhorn

Joined: Oct 21, 2012
Posts: 3
If the doService method is overwritten and it is made to call doGet or say doPost and that method is not defined, what will be the result..?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Nothing happens. The HttpServlet class provides a "do nothing" doGet() and doPost() for you. It also provides default "do nothing" for other methods.

From the browser's point of view, I believe the user just sees a white page since the request never returns anything from the server.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: doService calls doGet but if it is not defined?
 
Similar Threads
how to invoke both doGet() and doPost()
handling servlet exception gracefully
doPost() vs doService()
Why doPost and doGet and not everything in doService
Need solution for Question