1)foo.person p = new foo.employee(); p.setName("Evan"); request.setAttribute("person",p);
2)foo.employee p = new foo.employee(); p.setName("Evan"); request.setAttribute("person",p);
In HFSJ,it is given that the first servlet & JSP pair wont work because usebean action will search the "person" in page scope since the scope attribute is missing in the usebean action and it defaults to "page". Whereas the actual "person" object available only in request scope.I totally agree with this.But it is also given that the third servlet & JSP pair will work & print "Evan".How it is possible?.Here also "person" is set in the request scope & it should also fail right?.I dont understand the difference.Would request someone to clarify.
I don't own the book, so I don't know which page it is, but looking at the errata, I found this :
 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.