As we know

  • ServletContext
  • HttpSession
  • HttpServletRequest

are interface in JSP SERVLET api of Java..!

We repeatedly use it in our code for different purposes, but i am still confused where and in which class all abstract method for given interfaces are implemented ?
Like setAttribute, getAttribute , removeAttribute , getAttributeNames , getCookies , getContextPath...!

Please explain it in brief with example if posible..! (I am newbie in this technology..!)

Thanks in Advance...!

The important point here is that you don't need to know the answer to that question! The author of those classes defined an interface or abstract class that defines everything you need to know. Behind the scenes he can them implement it any way he wants, and maybe change it in future, without affecting your code in any way.