To create a
new portlet JSP file, follow these steps:
Select File > New > JSP File. The New JSP
File wizard opens.
Select a Folder as the appropriate container
for the file.
The folder should be under the WebContent folder
of the portlet project. If a JSP file is not under this
folder, then it will not be included in the WAR file that is deployed
to the server. In addition, link validation will not encompass files that
are not under the WebContent folder.
Type a File Name.
Ensure that the appropriate option is displayed in the Markup
Language drop-down list.
Select Portlet JSP in the Model field. Because the JSP file is created within the context of a specific project,
any file that you create will inherit the API-type and code model capabilities
associated with the project.
If you want to customize the file options, select the Configure
advanced options check box and click Next.
Otherwise, click Finish to create the portlet JSP file.
Depending on the target portlet project, the default portlet tag
library URI should already be included in the Tag Libraries page: /WEB-INF/tld/portlet.tld for IBM® portlet
projects, or http://java.sun.com/portlet for JSR 168
portlet projects. To insert tag library directives, click the Add button
to open the Select a Tag Library dialog and select the
tag libraries to insert. You must specify a Prefix value.
Click OK.
Optionally, click Next to add further properties
to the JSP file.
Click Finish to create the portlet
JSP file.
The newly-created JSP file is created and opened in Page Designer.