• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which of the following are correct JSP useBean declarations?

 
Firas Zuriekat
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Correct Ans: 1,3 5

Q1) Why is 1 correct?

It should be incorrect because the Head First book doesn't discuss beanName atttribute and when it's not discussed, it's usually the wrong answer. But here 1 is correct. I thought beanName is syntax error.

Q2) What combinations of useBean, class, type are acceptable in <jsp:useBean...> tag?
 
prashanth kumar
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Firas Zuriekat:


Correct Ans: 1,3 5

Q1) Why is 1 correct?

It should be incorrect because the Head First book doesn't discuss beanName atttribute and when it's not discussed, it's usually the wrong answer. But here 1 is correct. I thought beanName is syntax error.
>>HeadFirst discusses only stuff which is there in exam.And also in final >>exam,you can expect max of 3-4 questions outside headfirst though it can be less than that.
>>If you are going for 100%,you need to go through specs.


Q2) What combinations of useBean, class, type are acceptable in <jsp:useBean...> tag?


>>http://java.sun.com/products/jsp/syntax/1.2/syntaxref1217.html
 
Firas Zuriekat
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's great to know only 4 or less questions are outside the HF book. I relied completely on that very intuitive book. Compare to this from SUN:




The above is very UNintuitive discussion.

But thank you VERY much. Now I know the following:

"type" and "beanName" are valid together if they appear together in <jsp:useBean..>
without the "class" attribute.


However, I keep forgetting this fact. I have my exam in Very soon. I wish HF Book stuck this in my mind better that the above way :-)
[ December 31, 2006: Message edited by: Firas Zuriekat ]
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think 1 is not correct because the extension(.ser).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic