Jsp Directives
In jsp there are 3 types of directives
Include
Directive
The include directive is used to include the
contents of any resource it may be jsp file, html file or text file. Resource
included by include directive is loaded during jsp translation time. so it is better to
include static resource by using include directive. Include directive uses file attribute to specify resource to be
included.
Syntax
<%@
include file="url"
%>
Example
<%@
include file="first.html"
%>
JSP Taglib directive
The JSP taglib
directive is used to define a tag library that defines many tags. taglib directive
is mainly used to define JSTL tags and custom tags.
Attributes:
uri
prefix
syntax:
<%@
taglib prefix="prefix_name"
uri="uri of the taglibrary"%>
Example:
<%@
taglib prefix="myprefix"
uri="WEB-INF/message.tld"%>