Creating script-based portlet and projects

You can create script-based portlet applications from the Java™ EE or Web perspective that primarily uses HTML, JavaScript, and CSS for UI instead of a portlet JSP or a facelet.

Before you begin

You must be in the Java EE or Web perspective.

About this task

Use the New Portlet Project wizard to create script-based portlet projects.

Procedure

  1. Click File > New > Project.
  2. In the New Project wizard, select Portlet Project and click Next; then in the Confirm Enablement dialog box, click OK.
  3. In the New Portlet Project wizard, in the Project name field, enter a project name.
  4. From the Target runtime list, select a target runtime environment, such as IBM® WebSphere® Portal v8.0, WebSphere Portal 8.0 on IBM WebSphere Application Server 8.5, or WebSphere Portal 8.5.
  5. Select JSR 286 or JSR 168 as the portlet API; then:
    1. Click the Modify button for configuration.
    2. In the Modify Portlet Project Configuration dialog box, from the Portlet type list, select Script-based Portlet.
    3. Click OK.
  6. In the New Project wizard, click Finish.

Results

A file named <portlet-name>View.html is created and open by default in the Rich Page Editor. A file named <portlet-name>View.css is created under the WebContent/css folder, and a file named <portlet-name>View.js is created under the WebContent/js folder of the portlet project.

Feedback