• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about JSP..

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<jsp:useBean id="man" class="animal.Human"/>
where the object is kept? when the scope id not defined..
Thanks,
Trupti
 
See El
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In page scope.
BTW. u can learn a lot of thing by looking in to <tomcat-home>/work/<web-app> directory where appropriate java source are generated from your jsp pages.
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is page or pagecontext as the answer given for this question is "pageContext"
trupti
 
k space
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't mix up page (implicit object) with page scope.
From JSP spec, references to objects with page scope are stored in the pageContext object.
 
Hafizur Rahman
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not only the page scope objects but also others are kept in the pageContext object. For example, its a code fragment from generated java file.
pageContext.setAttribute("groupTreeBean", groupTreeBean, PageContext.APPLICATION_SCOPE);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic