Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Object visibility

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought Session is the most visible scope. Session is visible over all other applications.
Am I right?
Question in SCWCD@Whiz:
The Java objects used by a JSP page can be associated with a scope attribute which defines the accessibility of the corresponding object. Following are the various scopes that and object can be associated with:
session
request
page
application
Which of the following statements are true regarding the above scope objects?
a) The object is most visible inside the session scope.
b) The object is most visible inside the request scope.
c) The object is most visible inside the application scope.
d) The object is least visible inside the page scope.
e) The object is least visible inside the request scope.
f) The object is least visible inside the session scope.
Explanation:
C and D are correct. The visibility of the object increases from page scope to the application scope in the following order page->request->session->application. If an object is inside an application scope, it is accessible from all the pages belonging to the application. In case of page scope, the object is accessible only within pages where it was created. Inside the request scope, an object is accessible from pages processing the request where the object was created. Inside the session scope, an object is accessible from all the pages belonging to the session in which the object was created. Thus choices C and D are correct while others are incorrect.


[This message has been edited by Jorma Koistinen (edited November 09, 2001).]
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes You are Right
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think f) is correct answer too.
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Win Yu:
I think f) is correct answer too.



I think you missed the word "least". (f) is incorrect.
 
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic