• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MZ Notes : Doubt

 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For jsp:useBean,(http://java.boot.by/wcd-guide/ch08.html)

"If type and class are present, class must be assignable to type (in the Java platform sense). For it not to be assignable is a translation time error."

It is ClassCastException and not translation time error .

Please confirm,

Regards
Shivani
 
Rohan Kayan
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will be translation time error , if an object is not assignable to the class specified in type attribute then it will give translation time error.
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm.. just tested
if we have:
This is a translation error.

But if we have
and the page scoped variable da is not assignable (is of type test.pack.Empbean ) then it is ClassCastException.

Regards,
Shivani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic