How many types of directive tags JSP supports?

A JSP directive affects the overall structure of the servlet class. It usually has the following form −

<%@ directive attribute = "value" %>

Directives can have a number of attributes which you can list down as key-value pairs and separated by commas.

The blanks between the @ symbol and the directive name, and between the last attribute and the closing %>, are optional.

There are three types of directive tag −

S.No. Directive & Description
1
Defines page-dependent attributes, such as scripting language, error page, and buffering requirements.
2
Includes a file during the translation phase.
3
Declares a tag library, containing custom actions, used in the page
Updated on: 2019-07-30T22:30:25+05:30

273 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements