This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes let me get this straight.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "let me get this straight...." Watch "let me get this straight...." New topic

let me get this straight....

Jimmy Blakely
Ranch Hand

Joined: Jul 10, 2001
Posts: 57
Am I correct in concluding that...

When a HttpServlet receives a request, the object's service(ServletRequest request, ServletResponse response) method is called (inherited from GenericServlet) and that method in turn calls the object's service(HttpServletRequest request, HttpServletResponse response) method.
In essence, the method would look like this...
public void service(ServletRequest request, ServletResponse response) throws IOException, ServletException
service((HttpServletRequest)request, (HttpServletRespose)response); // object casting
Am I on the right track?
Rishi Singh
Ranch Hand

Joined: Dec 09, 2000
Posts: 321
hi jimmey,
yeah u r on the right track...whenever a request is made the service method of the Generic Servelet class is called , then if its a HttpServlet the service method has to be overridden by HttpServlet's service( public/protected)which in turn calls either the doGet/doPost as per the mode of request.
I agree. Here's the link:
subject: let me get this straight....
It's not a secret anymore!