Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServletConfig ServletContext???

 
Vilas Lawande
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

ServletConfig & ServletContext are interfaces

Where bodies for method of this interfeace are defined?
Please elaborate indetail............
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where bodies for method of this interfeace are defined?

You'll see plenty of others too. Because the Servlet Specification tells container providers what they have to implement.
They leave container providers write concrete classes, You can imagine that Tomcat's implementation will be different from Weblogic's. But they will do the same job, as written in the specification.
When you are written your own servlets, you don't care what the concrete class is. You work on interfaces. That's why your servlets will work on any container.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!