GeeCON Prague 2014*
The moose likes Servlets and the fly likes Wheres the HttpServletRequest/HttpServletResponse implemented Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Wheres the HttpServletRequest/HttpServletResponse implemented" Watch "Wheres the HttpServletRequest/HttpServletResponse implemented" New topic

Wheres the HttpServletRequest/HttpServletResponse implemented

Moha Shaf
Ranch Hand

Joined: Aug 30, 2008
Posts: 30
May be this is a very trivial question but can someone help me out.
Where are the HttpServletRequest and HttpServletResponse interface implemented. I see that the developers use the methods declared in these interfaces but have no clue where it is implemented.

Thanks in advance
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3833

Web container/Application server (which adheres to the Servlet specification) is responsible for providing those implementations.

[How to ask questions] [Twitter]
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 688


You extends your class with HttpServlet which extends and implement higher level class and interface so container will do for you you don't need to do this.

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42046
If you're looking for concrete code examples, you can download the Tomcat source code. It has the classes that implement those interfaces.

Ping & DNS - my free Android networking tools app
Moha Shaf
Ranch Hand

Joined: Aug 30, 2008
Posts: 30
thanks all. I was able to view the classes that implement these interfaces.
Don't get me started about those stupid light bulbs.
subject: Wheres the HttpServletRequest/HttpServletResponse implemented