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

y is it not other way in ServletConfig

 
Deepika Namasani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have doubt

Y does Container give referances of ServletConfig to name/value init parameters rather than ServletConfig object getting the refernaces from name/value init parameters .


Page number 152 in Head First SCWCD book.


Thanks
 
Sebastien Col
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think that's because it is the container that actually read the deployment descriptor, not the servlet.
Then the container instantiate the servlet and pass it its configuration information.
The container passes this information through name/value pairs.

Sebastien
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!