954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Where methods of ServletContext , HttpSession , HttpServletRequest are implemented ?

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...!

rushi3311
Newbie Poster
10 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

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.

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: