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 doubt.

 
chani singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to use a bean that is stored in com/enthu/GUI.ser file. Which of following statements correctly defines the tag that accesses the bean?


Select 1 correct option.
a <jsp:useBean id="pref" name="com/enthu/GUI.ser" />


b <jsp:useBean id="pref" name="com.enthu.GUI" />


c <jsp:useBean id="pref" type="com/enthu/GUI.ser" />


d <jsp:useBean id="pref" beanName="com.enthu.GUI" type="com.enthu.GUI"/>


e <jsp:useBean id="pref" class="com.enthu.GUI.ser" />


tha ans is d, why cant it be e..??
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi chani

tha ans is d, why cant it be e..??


Using beanName if there is not already a bean one will be created and initialized with the data in the .ser file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic