| Author |
scope of bean in jsp
|
punna Kumar
Ranch Hand
Joined: Feb 28, 2005
Posts: 80
|
|
1)in jsp the java bean can not used in below scope a)application b)session c)request d)page what is the answer for the above question
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Which do you think it is and why? We, here at Javaranch, enjoy helping people learn about Java but are loath to answer homework or test questions for you. Please see: http://faq.javaranch.com/view?DoYourOwnHomework Let us know your answer and we'll be happy to comment on it but, please, don't ever post multiple choice questions to these forums.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
punna Kumar
Ranch Hand
Joined: Feb 28, 2005
Posts: 80
|
|
Sorry Ben, It's not a homework....... one of my team member ask this question in chit chating in java....... My answer is a i mean Application java bean does not support the application level scope in jsp.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56543
|
|
Originally posted by punna Kumar: java bean does not support the application level scope in jsp.
Really? What makes you think so? [ July 31, 2006: Message edited by: Bear Bibeault ]
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1008
|
|
Actually my answer would be e)none of the above. Take a look at the valid values for scope when declaring a java bean on a page: http://java.sun.com/products/jsp/syntax/1.2/syntaxref1217.html#8865
|
 |
punna Kumar
Ranch Hand
Joined: Feb 28, 2005
Posts: 80
|
|
thanks for the replay. but there is no option like none of the above.............. <jsp:useBean> have a attribute called "scope". i fell question is related to the what is the scope of useBean in jsp page..... any idea.........
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56543
|
|
Originally posted by punna Kumar: any idea
1) Move your mouse over the link in Stefan's post. 2) When the cursor changes to the little hand, click the mouse. 3) Read.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
The spec is pretty clear about what a bean's scope is. Scope: The scope within which the reference is available. The default value is page. See the description of the scope attribute defined earlier herein. A translation error must occur if scope is not one of "page", "request", "session" or "application".
|
[My Blog]
All roads lead to JavaRanch
|
 |
 |
|
|
subject: scope of bean in jsp
|
|
|