wood burning stoves 2.0*
The moose likes Tomcat and the fly likes servlet context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "servlet context" Watch "servlet context" New topic
Author

servlet context

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
hi friends...
please tell me where does the servletContext interface is implemented,HttpRequest,HTTpresponse,are implemented... i had gone through tomcat library.....but i never found the implementaion by the tomcat...... is it so they are imoplementd intenally in service method or is there any jar files regarding the implementation.............


Creativity is nothing but Breaking Rules
Aakash Parashar
Ranch Hand

Joined: Jul 25, 2005
Posts: 121

santhosh.R gowda wrote:hi friends...
please tell me where does the servletContext interface is implemented,HttpRequest,HTTpresponse,are implemented... i had gone through tomcat library.....but i never found the implementaion by the tomcat...... is it so they are imoplementd intenally in service method or is there any jar files regarding the implementation.............


Implementation of ServletContext, HttpRequest, HttpResponse etc are done by container provider.

When we access ServletContext, its the object of ServlectContext type of implementation which is passed by container to Servlet.

I never tried to find out class in Container which implement these Interfaces provided by Servlet Specs. I would suggest you to browse servlet.jar.


Your's Aakash
SCJP 1.4 96%, SCBCD 1.3 94%, http://java-application-programming.blogspot.in
santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
Whether they are internally implemented or they are class files of the implementation........
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684


hi,

For better understanding, remember every servlet have their own servlet context object.

So, when you extend your class with HttpServlet class you explicitly access your servlet "servlet context" object.

So, no need to implement your class to "servletcontext" interface.



Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Since Tomcat is open-source, you can download the complete Java source code and explore the actual implementation. However this is not necessary - all you need to program for the servlet environment is the servlet specification and the JavaDocs for the API.

Bill
santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 296
thanks all of you....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: servlet context
 
Similar Threads
Struts problem
Declarative Secuirty
why my login page is not using SSL?
tomcat security
User logged in time - session listener?