aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes types of implicit variabless Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "types of implicit variabless" Watch "types of implicit variabless" New topic
Author

types of implicit variabless

Yu Chen
Greenhorn

Joined: Dec 03, 2001
Posts: 28
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


SCJP2<br />SCWCD
Anthony Villanueva
Ranch Hand

Joined: Mar 22, 2002
Posts: 1055
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

Joined: Dec 03, 2001
Posts: 28
Thanks, that is a important concept. It makes sense now.
-yu chen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: types of implicit variabless
 
Similar Threads
DOUBT on a question JSP SCOPES
Q: Data type for JSP implicit objects
A Speculation
ServletRequest / HttpServletRequest
JSP implicit Object HttpServletRequest or ServletRequest ?