Hitachi

JP1 Version 12 JP1/Navigation Platform Development Guide


4.3.4 Creating the JSP file used in custom windows

When you execute the template plugin creation command with the plugin information property file in which Custom Window Plugin information is defined, the custom window JSP file (ucnpCustom.jsp) is created. Do not edit ucnpCustom.jsp. JSP files for editing are created in the following directory:

Navigation-Platform-for-Developers-installation-directory\pluginSDK\plugin\plugin-ID\jsp\plugin-name.jsp

JSP files for editing (plugin-name.jsp) are included in ucnpCustom.jsp. Because Navigation Platform loads ucnpCustom.jsp and performs processing, JSP files for editing cannot use the library placed on the layer of the Application Class Loader. Use the library placed on the layer of the System Class Loader.

The following describes the items that can be specified in the JSP file for editing (plugin-name.jsp).

Table 4‒4: Items that can be specified in a JSP file used in custom windows

No.

Category

Item

Description

1

Tag

Directive

Specify a directive in the following format:

<%@ directive%>

2

Scriptlet

Specify a scriptlet in the following format:

<% Java-code %>

3

Expression

Specify an expression in the following format:

<%= expression %>

4

Comment

Specify a comment in the following format:

<%-- comment --%>

5

Directive

page

Define information such as JSP file encoding and Java import statement. To use a different encoding from that of the custom window JSP file (ucnpCustom.jsp), specify the pageEncoding attribute.

Do not specify the following attributes:

contentType attribute

"text/html; charset=UTF-8" is automatically applied during execution of the JSP file.

language attribute

"java" is automatically applied during execution of the JSP file.

6

include

Include other files such as a text file and JSP file.

7

Implicit object

request

Object variable of the javax.servlet.http.HttpServletRequest class

8

response

Object variable of the javax.servlet.http.HttpServletResponse class

9

session

Object variable of the javax.servlet.http.HttpSession class