extends JSP page directive with Example

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.

One thought on “extends JSP page directive with Example

Leave a Reply

Your email address will not be published. Required fields are marked *