• Post Reply Bookmark Topic Watch Topic
  • New Topic

extending a class or implementing a interface in jsp

 
Manoj Kumar Ravikanti
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I would like to know if we want to extend a class or implement a interface in a jsp file how can we do it.

Thankyou.

Regards
Manoj Ravikanti
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To what end?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The short answer is that you can't.

There is an extends attribute to the JSP page directive tag but it doesn't work in the way that you're probably expecting:

From JSP.1.10.1

extends
The value is a fully qualified Java programming language
class name, that names the superclass of the class to which
this JSP page is transformed (see Chapter JSP.11).
This attribute should not be used without careful
consideration as it restricts the ability of the JSP container to
provide specialized superclasses that may improve on the
quality of rendered service.
See Section JSP.7.5.1 for an
alternate way to introduce objects into a JSP page that does
not have this drawback.



JSPs can't implement interfaces and there would be no reason for them to do so.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!