• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP implicit objects and them scope

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a small problem, as far as I know the JSP defined four scopes : application, session, request and page. The last one, the page scope is refers the generated Servlet.
My question is "is the page scope a scope container" ?

Regards
M
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set attributes into the page scope the same as the other 3 scopes.

Does that answer your question?
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,

To be honest no, I don't understand.

Regards,
M
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to be more specific. I answered your question. Do you understand the concept of scope and understand the other 3 scopes but do not understand the page scope? What exactly do you not understand?
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,

I understand the scope concept and I don't have any problem with the classical three scopes (application, session, request). I also understand what the page scope is. It was my mistake. I got the question :

Which of the following implicit objects does not represent a scope container ?
a:application
b:session
c:request
d: page
e: pageContext.


the answer is d, because the page scope represents the translation unit only during a request. So this implicit object does not have any scope (in the given list), the pageContext has(represents) a scope the page scope.
The question was tricky.

Thanks,
M.
[ October 08, 2007: Message edited by: Mihai Radulescu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic