Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:usebean

 
Savyatha Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When using "jsp:usebean", if the bean class does not have a public no arg constructor, then whicy type of error will occur? is it compilation error OR an instantiation exception?
Thanks in Advance
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Savyatha Reddy:
When using "jsp:usebean", if the bean class does not have a public no arg constructor, then whicy type of error will occur? is it compilation error OR an instantiation exception?


when you tried,what type of error you got?
 
Savyatha Reddy
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didnt have tried to execute the same.. In Whizlabs1.4 simulator, I faced with 2 questions relating to the same context as I mentioned. As answer for 1 question they had given Compilation error and as the answer for the other question, they had given Instantiation exception. So Iam confused..
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the greatest of respect I would suggest you create yourself a simple bean without a public no arguments constructor, and see what happens then!

Rufus.
 
mimi chatterjee
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there will be servlet error-Unable to compile class for JSP
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic