Thursday 19 January 2017

What are the different types of JSP tags? What are JSP directives? What is page directive?


What are the different types of JSP tags?
The different types of JSP tags are as follows:



What are JSP directives?
·JSP directives are messages for the JSP engine. i.e., JSP directives serve as a message from a JSP page to the JSP container and control the processing of the entire page
·They are used to set global values such as a class declaration, method implementation, output content type, etc.
·They do not produce any output to the client.
·Directives are always enclosed within <%@ ….. %> tag.
Ex: page directive, include directive, etc.


What is page directive?
·         A page directive is to inform the JSP engine about the headers or facilities that page should get from the environment.
·         Typically, the page directive is found at the top of almost all of our JSP pages.
·         There can be any number of page directives within a JSP page (although the attribute – value pair must be unique).
·         The syntax of the include directive is: <%@ page attribute="value">
·         Example: <%@ include file="header.jsp" %>

No comments:

Post a Comment