File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:useBean action with beanName attribute

 
Reema Patel
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

The jsp:useBean action can also optionally accept a beanName attribute which specifies the name of a bean, as expected by the instantiate() method of the java.beans.Beans class. Is this attr. coered in the SCWCD exam?

Thanks,
Reema
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen it in mock exams.
 
Rohitt Vermaa
Ranch Hand
Posts: 232
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't remember whether it was mock test or real test. But what you need to know is Bean name should not appear with the class attribute.
 
Gowher Naik
Ranch Hand
Posts: 643
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Together beanName and class cannot be used inside jsp:useBean
If you use beanName then type is required.
 
Manikandan Jayaraman
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding to your knowledge ...

1. It is more concerned about instantiating a serialized bean.

2. That is why we use 'type' attribute with it, to let the container know, what should the bean be casted to.

3. Also, 'class' is not mentioned because 'class' is more towards creating a new instance when one doesn't exist. But here, we want to bring a serialized bean (existing bean) back into action.

I am sure about '1'. Points '2' and '3' are my extrapolation.
[ December 28, 2006: Message edited by: Manikandan Jayaraman ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic