aspose file tools*
The moose likes JSP and the fly likes Page object concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Page object concept" Watch "Page object concept" New topic
Author

Page object concept

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175
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

Joined: Jan 10, 2002
Posts: 61066
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 175
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

Joined: Jan 10, 2002
Posts: 61066
    
  66

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.
 
 
subject: Page object concept