- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is a page directive in JSP?
The page directive is used to provide instructions to the container. These instructions pertain to the current JSP page. You may code page directives anywhere in your JSP page. By convention, page directives are coded at the top of the JSP page.
Following is the basic syntax of the page directive −
<%@ page attribute = "value" %>
You can write the XML equivalent of the above syntax as follows −
<jsp:directive.page attribute = "value" />
Following table lists out the attributes associated with the page directive −
|S.No.||Attribute & Purpose|
Specifies a buffering model for the output stream.
Controls the behavior of the servlet output buffer.
Defines the character encoding scheme.
Defines the URL of another JSP that reports on Java unchecked runtime exceptions.
Indicates if this JSP page is a URL specified by another JSP page's errorPage attribute.
Specifies a superclass that the generated servlet must extend.
Specifies a list of packages or classes for use in the JSP as the Java import statement does for Java classes.
Defines a string that can be accessed with the servlet's getServletInfo() method.
Defines the threading model for the generated servlet.
Defines the programming language used in the JSP page.
Specifies whether or not the JSP page participates in HTTP sessions
Specifies whether or not the EL expression within the JSP page will be ignored.
Determines if the scripting elements are allowed for use.
- Related Articles
- What are various attributes Of page directive in JSP?
- What is a include directive in JSP?
- What is a taglib directive in JSP?
- What is a page object in JSP?
- What is the purpose of taglib directive in JSP?
- What is JSP page redirection?
- What is the difference between include action and include directive in JSP?
- What is an exception Object in JSP? What type of exceptions can occur in a JSP page?
- Please share a running example of include directive in JSP
- How many types of directive tags JSP supports?
- What is the use of page object in JSP? Need an example.
- Please share one example of using taglib directive in JSP
- How to write a comment in a JSP page?
- How a JSP page works. Can somebody explains the JSP architecture in simpler terms
- What is a pre-processor directive in C#?