W3schools - JSP_Directive
찾으시는 정보가 있으시다면
주제별reference를 이용하시거나
우측 상단에 있는 검색기능을 이용해주세요
Directive
Provides directions and instructions to the container, telling it how to handle certain aspects of the JSP processing
Page
Is used to provide instructions to the container, pertain to the current JSP page
<%@ page attribute = “value”%>
<!-- in XML -->
<jsp:directive.page attribute = “value”>
Attribute
buffer : Specifies a buffering model for the output stream
autoFlush : Controls the behavior of the servlet output buffer
contentType : Defines the character encoding scheme
errorPage : Defines the URL of another JSP that reports on Java unchecked runtime exceptions
isErrorPage : Indicates if this JSP page is a URL specified by another JSP page’s errorPage attribute
extends : Specifies a superclass that the generated servlet must extend
import : Specifies a list of package or classes for use in the JSP as the Java import statement does for Java classes
info : Defines a string that can be accessed with the servlet’s getServletInfo() method
isThreadSafe : Defines the threading model for the generated servlet
language : Defines the programming language used in the JSP page
session : Specifies whether or not the JSP page participates in HTTP sessions
isELIgnored : Specifies whether or not the EL expression within the JSP page will be ignored
isScriptingEnabled : Determines if the scripting elements are allowed for use
The include Directive
Is used to include a file during the translation phase
This directive tells the container to merge the content of other external files with the current JSP during the translation phase
Can code the include directives anywhere in JSP page
<%@include file = “relative url”>
The filename in the include directive is actually a relative URL
If just specify a filename with no associated path, JSP compiler assumes that the file is in the same directory
<jsp:directive.include file = “relative url”>
Can write the XML equivalent
The taglib Directive
JSP pages API allow to define custom JSP tags that look like HTML or XML tags and a tag lib is a set of user-defined tags that implement custom behavior
The taglib directive declares that JSP page uses a set of custom tags, identifies the location of the lib, and provides means for identifying the custom tags in JSP page
<%@ taglib uri = “uri” prefix = “prefixOfTag” >
Can write the XML equivalent
<jsp:directive.taglib uri = “uri” prefix = “prefixOfTag”/>