Click to See Complete Forum and Search --> : Doubt about ServletRequest Interface


thennam
12-29-2005, 01:20 AM
Dear Friends,

we are using getParameter() of the interface ServletRequest.

The interface can't implement it's method. then which class implent

ServletRequest interface. i am sure that GenericServlet class also


didn't implement it


please help me ..............

sagi_kiran
01-04-2006, 05:41 AM
Both the ServletRequest and the HttpServletRequest are interfaces, the implementation to their methods is given by the service provider. For Ex: if you are working on Tomcat Webserver. The actual implementation(class) of these interfaces is given by Tomcat, and the instance of this implementation is given to you. As this class extends HttpServletRequest or ServletRequest, the user has access to these methods.

Hope this clears your doubt