wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes PageContext and ServletContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "PageContext and ServletContext" Watch "PageContext and ServletContext" New topic
Author

PageContext and ServletContext

Saurabh Naik
Ranch Hand

Joined: Apr 24, 2008
Posts: 87
hello..
I am just confused in PageContext and ServletContext... how it is usefulll ?


SCJP 6 (88%), SCWCD 5 (78%), preparing for SCBCD
Oscar Costa
Ranch Hand

Joined: Feb 05, 2009
Posts: 31

Hello,

It's about Scope:
The ServletContext has the application scope, it contains objects presents in all the servlet life cycle, like configuration parameters presents on deployment descriptor...
And the PageContext is just for the jsp. But it have an add where you can get/set attributes from any scope. See the specification: http://java.sun.com/j2ee/1.4/docs/api/index.html


"Do or do not... there is no try!" - Jedi Master Yoda
> SCJP 5 : SCWCD 5 : SCBCD 5 <
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: PageContext and ServletContext
 
Similar Threads
which jsp imlicit object?
ServletContext, ServletConfig and Pagecontext
Page PageContext and application
Diff: JSPContext, ServletContext and PageContext
Accessing webapp context parameters from a custom tag handler