• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query reg . jsp:usebean

 
Chandu Sree
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q)Name the default value of the scope atribute of <jsp:usebean>.

Answer they gave is page.


But I think it can take any of these page,request,session or application.

Correct me if I am wrong with proper explaination.

Thanks!!
 
Collins Mbianda
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi chandu !!!
The default value means you don't precise any scope.

<jsp:usebean id="mybean"/> is the same as <jsp:usebean id="myBean" scope="page"/>

but if you write <jsp:usebean id="myBean" scope="request"/>, mybean will be founded in the request.

Hope it help.
 
Jan van Mansum
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that it is <jsp:useBean> with a capital B. Also a class or type attribute must be present. This is not to be pedantic, but on the exam they do try to trick you into selecting an answer that has only such a "minor" mistake in it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic