This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please can any body explain me Extends page directive in Jsp page?  RSS feed

 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

As we know extends page directive where we are extending the java class, in syntax they had given package.class but when i extend my own class in my Jsp its trowing compile time error please let me know which classes we can extend in this directive with example
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not something you should even think of doing in modern JSP. That's a throwback to the days before JSP 2.0.
 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a throwback to the days before JSP 2.0


Sorry sir i'm new to JSP please explain me This directive
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are new to JSP, then learning how to do things the right way is important. Extending is not "the right way" and hasn't been for a long long time.
 
Gireesh Giri
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we can extend both user defined as well built in classes, Try with this,

<%@ page extends="com.coderanch.A" %>

above, com.coderanch is the package name where my class A has created.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!