• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

q on jsp:useBean

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
which of the following statements r true regarding jsp:useBean

the value of beanName can be specified as a request time attribute expr.
the beanName can refer to a class or a serialzed bean.
value of the type attribute can be the class of the bean or its superclass, not an interface.
the class & beanName attributes cannto b used together.
the type attribute can be used only with class or beanname attribute.

i feel 4 & 5 are correct. but wht does 2 mean?
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My answers are 1,2,4

Thanks
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even I feel 4 & 5 are correct.

beanName is only used in case of serialized bean.
here the object is stored in the persistent storage with extension .ser.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Option 5 is incorrect as you can use type without class and beanName.

beanName can be used for class as well as serialized bean.

Thanks
 
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Correct options are 1,2 & 4.

In usebean decl type attribute can be used alone => option 5 is wrong

In usebean decl beanname can be either class name or serialized bean name(can refer to SCWCD study kit for more details on this) & it can accept req time expn value => option 1 & 2 are correct.

hth..

Regards,
Priya.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is serialized bean as given in option 2
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what exactly is beanName? can someone explain or give links to this.
[ October 25, 2005: Message edited by: M Rama ]
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There has been no mention about beanName attribute in HFSJ Book.

Have a look at this thread. It should be useful


https://coderanch.com/t/288293/JSP/java/beanName-Attribute-useBean-action
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic