• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the use 'page' implicit object in a jsp?

 
Shreyas Dange
Greenhorn
Posts: 16
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello guys ,

I know that there are 9 implicit objects that are available in a JSP page , except the page implicit object every object has certain utility ,but i am not able to understand the usage of a 'page' implicit object.

I've read it is actually an object of the servlet which is obtained after compiling this JSP page ,moreover a reference of Object class hold this 'page' object so there are only those 11 legacy methods of Object class which anyone can invoke on it and even if the 'page' object is typecasted to our generated servlet class it will also be of no use until there are any instance methods or fields(which are not Thread-safe) declared through <jsp:declaration> tag ,and writing instance method through jsp:declaration will again bring us to the old discussion of avoiding java code from JSPs..

Any help on this will be appreciated ..
thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, scriptlets on a JSP page have been obsolete for over 12 years now (12 years! 12!) so none of the implicit scriptlet variables are of any use any longer. But, even back when scriptlets were in vogue, I never found any useful real-world use for the page variable.
 
Shreyas Dange
Greenhorn
Posts: 16
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankyou Bear ..!! i got it..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!