Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

beanName attribute in jsp:useBean

 
Rahul Jadaun
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the question from JDiscuss below. HFSJ doesn't mention any beanName attribute. Is it valid?




Which of the following statements regarding <jsp:useBean> action are correct?


Options


Select 2 correct options.

It must have an 'id' attribute.

If 'beanName' attribute is present, 'type' must also be present.

It must have a 'scope' attribute.

If 'class' attribute is present, 'type' must also be present.
 
Dinuka Arsakularatne
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
options 1 & 2 are correct. if beanName is used then you should have type. but it is invalid to use beanName and class together. this is mentioned in mz's notes. check them for more clarification.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if beanName is used then you should have type. but it is invalid to use beanName and class together. this is mentioned in mz's notes. check them for more clarification. !!

HFSJ doesnt cover beanName, thats why they say, you should read somethine more !
 
What are you doing? You are supposed to be reading this 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!