• Post Reply Bookmark Topic Watch Topic
  • New Topic

Be the container. HSFJ pg 356

 
Charmy Madhvani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The exercise in that page says that 3rd servlet code is right. But when I actually practised it all 3 are wrong.
In all the three cases bean sets in the request scope. But in jsp It searches bean from page scope. It it an errata?

Also if I give scope="request" in useBean, the Ideally 1st servlet code should give me an error since in Servlet the bean type is Person and Object type is Employee. But in jsp I am looking for type Employee.
Please correct me if I am wrong.
 
Fu Dong Jia
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right,all 3 are wrong!
 
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!