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 what is the difference  between pagecontext  and  rest of  internal objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "what is the difference  between pagecontext  and  rest of  internal objects" Watch "what is the difference  between pagecontext  and  rest of  internal objects" New topic
Author

what is the difference between pagecontext and rest of internal objects

kajal mukergi
Ranch Hand

Joined: Mar 22, 2007
Posts: 102
Hello friends

what are these requests and.. and why it is used and\
what is the.. difference between page context and. request and...

rest
and. also...

we ahve this page context in jsp and also .. servlet.........

so can any give me... clear idea tegarding this..

why we use

and...
Page context so.. highlighted a lot than other internal onjects......

thank you very much friends.......
khushhal yadav
Ranch Hand

Joined: Jun 20, 2007
Posts: 242

Hi Kajal,

If you ae asking difference between the implicit objects provided by EL (Expression Language).

Then among all the implicit objects that EL provides, all are maps except pageContext.

For example, if you talk about requestScope, then it's a map of all the attributes stored in request scope. requestScope is not an instance of ServletRequest.
However, pageContext is a reference or rather you can say a bean which provides you the instance of various scope objects.e.g. ${pageContext.request} will give you an instance of request.

Regards,
Khushhal


rgrds,
Khushhal
kajal mukergi
Ranch Hand

Joined: Mar 22, 2007
Posts: 102
thank you
Arvind Mishra
Greenhorn

Joined: Jul 04, 2007
Posts: 28
Hi

The main advantange of pageContext over other implicit objects like session , request , response etc. they look for asked attributes in their respect only.
If you are looking for an attribute in pageContext , the container will look for that attribute in request , seesion & application scope .
It has a method
<code> pageContext.findAtrribute(String name) </code>
through which you can find a particular attribute.

Hope this clears the doubt .If you are stil not clear just let us know.

Regards
Arvind
Either you do or dont theirs' nothing called try.


Regards<br />Arvind Mishra<br />SCJP<br />SCWCD<br />IBM SOA Associate
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3353


Originally posted by kajal mukergi:

Hello friends

what are these requests and.. and why it is used and\
what is the.. difference between page context and. request and...

rest
and. also...

we ahve this page context in jsp and also .. servlet.........

so can any give me... clear idea tegarding this..

why we use

and...
Page context so.. highlighted a lot than other internal onjects......

thank you very much friends.......


Hello kajal mukergi,

Hope you might have got the answers if the ranchers were able to get your query correctly.

But to me, it seemed like you were in a hurry which did not even allow you to patiently quote your requirement.

Can you please try to mention what you need in a clear and legible way in your future posts? so that it will be helpful to fetch reasonably-good answers.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
 
 
subject: what is the difference between pagecontext and rest of internal objects