This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 166
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: 60048
    
  65

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: 166
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: 60048
    
  65

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page object concept
 
Similar Threads
page implicit variable
page vs. pageContext
jsp implicit variable
what is use of page object?
A Speculation