File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 3902

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: 689


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: 42965
If you're looking for concrete code examples, you can download the Tomcat source code. It has the classes that implement those interfaces.
Moha Shaf
Ranch Hand

Joined: Aug 30, 2008
Posts: 30
thanks all. I was able to view the classes that implement these interfaces.
I agree. Here's the link:
subject: Wheres the HttpServletRequest/HttpServletResponse implemented
It's not a secret anymore!