• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing implicit Objects in JSP

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

what is the advantage we will get when we access implicit objects in JSP using PageContext , rather than using them directly ??


Thanks in advance .

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean "instead of accessing them directly"?

The very name "implicit object" means that you *will* access them directly.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David , it seems you are always angry .

I am mean using session directly and by this :

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems you tend to think people are angry when they're not.

I have no idea why anybody wouldn't use the implicit objects; they're there as a convenience.
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David isn't angry, he's just marking something "obvious"

Well, as far as your PageContext is concerned, I really can't think of a situation where I would use that in a JSP other than where I want to use "my own sweet names". These objects like session, request, exception etc are meant to be used directly.

Regards
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the Java servlet code which the JSP compiler creates - you will see that those implicit objects are created "directly", it is just that JSP does it for you.

Bill
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!