• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

types of implicit variabless

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question ID :997967667647
For the JSP scopes of request and page, what type of object is used to store the attributes?
1. HttpServletRequest and ServletContext respectively
2. ServletRequest and ServletConfig respectively
3. ServletRequest and PageContext respectively
4. HttpServletRequest and PageContext respectively
5. ServletConfig for both
I would say (Http)ServletRequest and Object respectively, but the answer is 3?? In Manning's study kit, it states that the implicit variables are of type/class:
application: ServletContext
session: HttpSessoin
request: HttpServletRequest
response: HttpServletResponse
out: JspWriter
page: Object
pageContext: PageContext
config: ServletConfig
exception: Throwable

Any thoughts?
Thanks,
-yu chen
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Attributes of request scope are stored in ServletRequest objects, while attributes of page scope are stored in PageContext objects. The implicit object "page" is not the same as the "pageContext" object.
In the JSP 1.2 specs:

whilst the implicit object page is


The instance of this page’s implementation class processing the current request.

 
Yu Chen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that is a important concept. It makes sense now.
-yu chen
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic