Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page object concept

 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

I am having doubt in the implicit page object of the jsp.
I know that inside the *_jsp.java page , the page object is defined as the reference to the java.lang.Object class.

ie. Object page = this;

Everywhere it is written that it represent the object of that jsp page.

I didnt get the following line , please help me to understand it :
"It serves as a reference to the java servlet object that implements the JSP page on which it is accessed"

Thanks !!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beneath the covers, JSPs are implemented as servlets. This is an implementation detail that has nothing at all to do with how you write modern JSP pages. It's only interesting for academic purposes.
 
Tarun Oohri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Beneath the covers, JSPs are implemented as servlets. This is an implementation detail that has nothing at all to do with how you write modern JSP pages. It's only interesting for academic purposes.


I know Bibeault, in practice it may not be important to know but for interviews you must know everything because you never know when the interviewer starts throwing crazy questions.:)
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would hope that whomever you are interviewing with knows better than to ask idiotic questions, but I guess we cannot count on that. All that is pertinent is that the variable points to the servlet instance. There's not much else to know about it. Because modern JSP pages have no Java code in them, it's really an unimportant and irrelevant detail.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic