File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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