Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

web application initialization

 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the order of the web application initialization from here. But I couldn't understand the 3rd point. Please explain it.

Web application initialization...
1. First of all the web container reads the deployment descriptor file and then creates a name/value pair for each <context-param> tag.
2. After creating the name/value pair it creates a new instance of ServletContext.
3. It's the responsibility of the Container to give the reference of the ServletContext to the context init parameters.
4. The servlet and jsp which are part of the same web application can have the access of the ServletContext.


On that line, they have said, reference of the ServletContext to the context parameters? For a web application, there should be a ServletContext object in a JVM, then what is context object, to which they've said, passed the ServletContext object?

Thanks in Advanced!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea what they're trying to say. It makes no sense to me. I wouldn't worry about it and would use more reputable sources of information.

Why not just read the Servlet Specification?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Why not just read the Servlet Specification?


Thanks Sir, I'll find out from Specification....
 
Michael Angstadt
Ranch Hand
Posts: 277
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it would make more sense if it was the other way around:

"It's the responsibility of the Container to give the reference of the context init parameters to the ServletContext."

Good luckings!
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe this peace of code might help you:


You don't have to worry how Servlet Context is comming to your servlet. Just know that the containner will provide it to you. [=
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!