This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servletContext& ServletConfig

 
Sivasankar Dhandapani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we need to servletContext and ServletConfig , in what way it will help , when we go for servlet as controller?
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- to get init parameters
- to get application resources
- to get request dispatchers
- to get application attributes

... and more, but a quick look at the API will show you what can be done through those interfaces.
 
Amarender Reddy
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet config cannot communicate directly with the servlet container.

so it uses servlet context as a medium to talk to servlet container to avail

varoius services

cheers
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
but a quick look at the API will show you what can be done through those interfaces.


Yes. There is no other better substitute.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic