Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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: 65537
108
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: 65537
108
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.

 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!