Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ethurware Query

 
Sanjay pts
Ranch Hand
Posts: 357
  • 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"


Which is the correct answer.???

Given answer is d. But i think its e.

Please give me suggestion.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

d is right. The .ser files are stored in pysicla disk file with state. Only the beanName option try to find it.

Thanks
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The allowed combinations of the mandatory attributes for the <jsp:useBean> tag are:

1. class
2. type
3. class and type
4. bean and type

(id attribute is anyway mandatory in all the 4 above options).

Hope the above helps to remember this easily.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic