Portlet Factory, Version 6.1.2


 

JSP Directive builder inputs

This topic describes the inputs for the JSP Directive builder.

Table 1. JSP Directive builder inputs
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Directive Select one of the following directives from the drop-down menu:

include

Select the include directive to insert a file into the servlet class at the time the JSP file is translated into a servlet.

page

Select the page directive to specify how you want to structure the servlet

taglib

Select the taglib directive to use JSP tags defined in a library.
If you selected include from the directive drop-down menu, enter the following: In the Name field, enter the name of the file you want to insert. The builder assumes the file is located in the servable_content_root directory. If the file is located in a directory under servable_content_root, you need to include the directory name, as shown below:

/include/filename

where

  • include is the directory containing the file you want to insert and it is a subdirectory of servable_content_root

  • filename is the name of the file you want to insert
If you selected page from the directive drop-down menu, enter the following:

page

Select the page into which you want to insert the JSP directive.

autoFlush (optional)

If selected, the output buffer is flushed when it is full. If this option is not selected, an exception is triggered when the buffer is full. An example of the run-time code is the following: <%@ page autoflush="true" %>

buffer

Specify the buffer size for the out variable (type JSPWriter). When entering the buffer size, enter kb for kilobytes after the number. For example 100kb. The documents are not sent to the client until the buffer size has been reached or the page has completed loading. The buffer size must be at least 8 KB. If you turn off buffering, HTML content appears after JSP entries that define headers or status codes. <%@ page buffer="100kb" %>

errorPage (optional)

Enter the relative path of the JSP page that should process exceptions thrown, but not those caught in the current page. The builder looks in the servable_content_root directory for the JSP page. A typical errorPage input entry might look as follows: /errors/pages/JSPErrorPage.jsp

extends (optional)

Specify the superclass of the servlet generated for the JSP page. What you enter might cause conflicts if the server is already using a custom superclass. The builder looks in the servable_content_root directory for the class. An example of the run-time code is the following: <%@ page extends="test.MyJSPBase" %>

import (optional)

Package that you want to be imported when the JSP page is translated. The builder looks in the servable_content_root directory for the class. An example of the run-time code is the following: <%@ page import="java.util.Date" %>

info (optional)

Enter any additional information. This information is stored as a string, which can be retrieved by the serlvet by using the getServletInfo method. An example of the run-time code is the following: <%@ page info="Additional Information" %>

isErrorPage (optional)

Select this option if you want the current page to act as an error page for another JSP page. An example of the run-time code is the following: <%@ page isErrorPage="true" %>
If you selected taglib from the directive drop-down menu, enter the following:

page

Select the page into which you want to insert the JSP directive.

prefix

Enter a prefix for the tag. The prefix is used in the taglib directive. For example:
<%@ taglib uri="Charting.tld" prefix="chart" %>

where chart is the name entered in the prefix field.

The prefix is used in front of the JSP tag. For example, assume the TLD file defines a tag named TagName and the prefix name is chart. The tag name at run-time would be the following: <chart:TagName>

uri

Enter the URI for the tag library descriptor (TLD) file that contains the attributes of the JSP tag you want to use. The builder looks in the servable_content_root directory for the TLD file. The tag library URI is put into the JSP page in the taglib directive. For example:
<%@ taglib uri="Charting.tld" prefix="chart" %>

where Charting.tld is the name entered in the uri field.

Parent topic: JSP Directive builder


Library | Support |