Share on Google+Share on Google+

Page directive attributes

A directive is a way to give special instructions to the container at page translation time.

Page directive attributes


A directive is a way to give special instructions to the container at page translation time. The directive comes in three forms:

The page directive is written on the top of the jsp page. Some of the attributes of the page directive are given below:

autoFlush : It empty the buffer.
buffer: It sets the buffer size. By default the buffer size is 8kb. 
contentType : It tells which 
errorPage: It tells which page will handle the exception if arises. 
import: In this we tells the container which package of file needs to be imported.
info: If we have to send some information with the jsp page. 
language: By default it is java.
session: In this we tells the container if we want the session or not. By default it is true. 

The other directives are :The include directive and the taglib directive 

The code of the program is given below:

<%@ page autoFlush="true"
         info="Jsp page directive attributes Example"
  <HEAD><TITLE>Page directive attributes Example</TITLE></HEAD>
   <FONT SIZE="5" COLOR="#660000">These all are Jsp Page directive attributes.</FONT> 

Output of the Program:

Download this example.


Posted on: March 12, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: Page directive attributes  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Gaurav Sharma
May 7, 2012
Kronos Techical Assesment