Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the difference between pagecontext and rest of internal objects

 
kajal mukergi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
kajal mukergi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
Arvind Mishra
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic