Poonam Agarwal wrote:hello paul,
My confusion is if page is a type of pageContext oject , As it is given in my previous post (by enthuware explanation),
1. If we says default to page scope, it mean this OR objects are bound to this scope are available only for this page. Am i right??
It dosen't mean that attribute or bean bound with this scope exists in the pageContext(application acope) ??
My confusion is getting very ugly , I don't konw how to clear it up..
Please help me sort ir out..
This might help -
1. page, request , session, and application are names, just simple names used for human convenience, of the various "scopes" in which you can keep objects.
2. So, when you say that an object O1 is kept in scope S, O1 is actually stored in a container (like you store key value pairs in a HashMap). For each scope there is a different container. For page scope the class of the container object is PageContext. For request scope the class of the container object is ServletRequest and so on.
3. When you store an object in a container, you can get that object back only from locations where that same container is available. For example, the container for page scope is available only in that page.
4. PageContext is not same as "application". "application" scoped objects are stored in ServletContext and so they are available from everywhere in the webapp (because there is only one ServletContext in a webapp and it is accessible everywhere)
HTH,
Paul.
On a side note, my humble suggestion is that before attempting any mock questions, you need to thoroughly read a book and develop some sample web applications. From the questions that you have posted on this forum, I believe going through the book will help you immensly. Otherwise, you may not be able to derive full value out of mock exams.