File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Overriding HTTP methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Overriding HTTP methods" Watch "Overriding HTTP methods" New topic
Author

Overriding HTTP methods

Ryan McClain
Ranch Hand

Joined: Nov 27, 2010
Posts: 79
There is a rule that says you should always override at least one of both doGet() and doPost() methods. It also states that if you don't override the method, you're telling the Container that this servlet does not support HTTP POST/GET requests.

What message would one get from the server if one does not override any HTTP methods in the servlet code?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Here is the list of HTTP status codes. Can you find which one you think you'd receive?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Overriding HTTP methods
 
Similar Threads
Doubts in service()/doPost()/doGet()
HF-pg98 : HttpServlet is an abstract class ?
doubts on service, post, get metods?
JSP Question
what is the output of the code and why is it so????