This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 30057
    
149

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doService calls doGet but if it is not defined?
 
Similar Threads
Why doPost and doGet and not everything in doService
Need solution for Question
doPost() vs doService()
handling servlet exception gracefully
how to invoke both doGet() and doPost()