• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page 356..Be the container

 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is given that 1st and 2nd example will not work but the 3rd example will work. But its wrong. 3rd will also not work. In the servlet Employee object is set in request scope. But in the jsp , useBean tag has no scope. That means it takes from the page scope. So 3rd also should give an instantiation error. I hope I am right.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check the HFSJ errata.
[416] Be the Container Answers;
The third example will not work for the same reason that the first example doesn't
work, because the attribute is at Request Scope, and the default scope is Page scope.
The handwritten comment for bullet #3 should be the same as for bullet #1.


Later printings removed the third example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic