Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

let me get this straight....

Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
    Bookmark Topic Watch Topic
  • New Topic