• Post Reply Bookmark Topic Watch Topic
  • New Topic

Head First SCWCD 2nd edition page 420

 
Dinusha Rathnamalala
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can some body explain me Head First SCWCD 2nd edition page 420.I didn't get any error message when i run that scenario.I got printed "Evan" but what is this

foo.Person p = new foo.Employee();
p.setName("Evan");
request.setAttribute("person",p);

and,

FAILS at request time!.................can some one please explain this comment (FAILS at.....) I cant understand?

....Thank you...
[ October 18, 2008: Message edited by: Dinusha Rathnamalala ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65665
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion HFSJ is incorrect. There have been a few revisions to the "be the container" exercise, and in early 2nd edition prints they had the bean been instantiated and available in the request scope, so the usebean finds it and can cast it in to the specified type.

For any doubts with HFSJ, check the errata. This one crops up in the unconfirmed section, and has been discussed a good number of times on this forum:

http://oreilly.com/catalog/9780596516680/errata/

Rufus.
 
Dinusha Rathnamalala
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks dude Cheers
[ October 19, 2008: Message edited by: Dinusha Rathnamalala ]
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!