extends JSP page directive with Example


extends JSP is one of the 14 attributes, JSP page directive supports. This attribute is used to inherit a class into JSP file.
Syntax of extends JSP

Example: <%@ page extends="pack.Demo" %>

where pack is the package name and Demo is the class that is inherited. Now,Demo class is available to the JSP file to use.

1 thought on “extends JSP page directive with Example”

Leave a Comment

Your email address will not be published.