• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

useBean doubt??

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Page 356 of HFSJ, I have the following doubt! For the 1st option, foo.person p = new foo.Employee();, they say that this fails at request time...the reason being that the attribute is set in the request scope and in the useBean, the default scope is page. So I want to know what exactly is the difference between request and page scope??
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not everyone has HFSJ book so try to post the complete question.

As far as difference between page and request scope is concerned, page scope is less accessible whereas request scope has more accessibility. Page scope is available for one page only whereas request can be accessible to multiple pages depending upon the situation. For example you can forward the request to multiple pages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic