Advanced Customization > Info*Engine User’s Guide > Info*Engine Custom Tag Reference > Directives > page Directive
  
page Directive
The page directive defines the general characteristics of a JSP page. The page directive is a standard JSP directive and is also used in standalone tasks. You include the page directive as the first tag on an Info*Engine JSP page and the first line in a task file.
JSP Use
Use this directive to specify the characteristics of the page, such as:
Identify the Java language used in scripts on the page
Specify the MIME type and character encoding
Specify the page scope
Import any class files or packages needed for the page
Determine what page is displayed for errors
Identify the page as the error page
Standalone Task Use
The task compiler recognizes a standard page directive, but only uses the import attribute for importing the necessary class files and the access attribute for determining how a task can be invoked.
* 
The access attribute is accepted only by tasks, not JSPs.
Tag Syntax for Common Page Characteristics
<%@page language="java"
session="boolean"
import="list_of_classes"
contentType="mimeType [;charset=characterSet]"
errorPage="error_page_url"
isErrorPage="boolean"
access="http|soap|internal"%>
Attribute Descriptions
Required attributes: language
access
A list of access methods acceptable to an Info*Engine task. The possible values are:
internal — The task is invoked by callers internal to the Windchill VM. No external clients are allowed to invoke a task. This value is implicit.
soap — The task is called by SOAP clients.
http — The task is called by raw HTTP clients through the IE servlet.
* 
Windchill uses internal task access by default. Therefore, you must explicitly specify task access for tasks that are intended to be called by external clients.
The access attribute is accepted only by tasks, not JSPs.
Values can be specified as a pipe-separated list. For example, use access=“http|soap” for tasks that can be invoked using a SOAP client or the IE servlet.
* 
In situations where several tasks compose a service, you can specify a value for the subdirectory to avoid editing each individual task. To do this, update the .delegateInfo file in the subdirectory where your tasks are installed. For example:
<Windchill>/tasks/com/ptc/windchill/ws/.delegateInfo
The .delegateInfo file is a simple Java properties file, so in this case you would not use quotes when specifying access. For example, access=soap.
contentType
The MIME type and character encoding the JSP file uses for the response it sends to the client. You can use any MIME type or character set that is valid for the JSP. The default MIME type is text/html and the default character set is ISO-8859-1.
errorPage
Defines the URL to the error page for the current page. Any errors not caught on the page cause the page named in this attribute to execute. The error page named must include the isErrorPage="true" attribute in its page directive.
import
Identifies the Java class files or packages that are made available to the scripting language that is on the page or in the task. You can specify a comma-separated list containing either fully qualified type names or package names followed by “*”. Specifying a package name makes all public types in the package available.
isErrorPage
Indicates whether the current page is used as the target of another JSP page errorPage attribute. To use the current page as an error page for another page, set this attribute to true. By default, this attribute is set to false.
language
Defines language that is used in the page. The value of this attribute must be java.
This attribute is required.
session
Sets the scope for the page. To set the page scope to the session, set the session attribute to true. To set the page scope to the current page, set the session attribute to false.
This is an optional attribute. If you omit this attribute, the page scope is the session.
Example
The following page directive sets the language to Java, sets the scope of the page to the session, imports the Info*Engine factory and object packages, and sets the error page to IEError.jsp:
<%@page language="java" session="true"
import="com.infoengine.object.factory.*,
com.infoengine.object.*"
errorPage="IEError.jsp"%>
For additional information about error pages, see Catching Exceptions.