Jetspeed

Essentials

Download

Documentation

Components

Get Involved

JSP

Class Name : org.apache.jetspeed.portal.portlets.JspPortlet


Description

Present the output of a JSP in a portlet.

Why use a JSP portlet instead of a WebPagePortlet?

  • JSP does not have to be visible to the Web Server
  • Specific task can not be achieved with WebPagePortlet

Jetspeed Tag Library

The JSP can display information from Jetspeed by using Jetspeed's Tag Library. The type of information ranges from username to Link information. <jetspeed_home>/WEB-INF/templates/jsp/tld/template.tld contains the TagLib declarations.

The following table documents some of the available tags. The template.tdl file will contain a more complete list.

Tag Name Description
jetspeed:info Return value of requestInfo
Value Description
Email E-Mail address of the logged in user
FirstName First name of the logged in user
LastName Last name of the logged in user
Username Username of the logged in user
ServerDate Current Data and Time on the server


Supported Media Types

Description of Media Types.



Element: parameter

Parameter that control the how the web page is converted into a portlet.

This template parameter is required.

Parameters common to many portlets.

Parameter Name Description
template Name of JSP file. The actual file will be located by using the current media type, language, and country in the directory <jetspeed_home>/WEB-INF/templates/jsp/portlets


Example of Registry Entry
<portlet-entry name="HelloJSP" hidden="false" type="ref"
    parent="JSP" application="false">
    <meta-info>
        <title>HelloJSP</title>
        <description>Simple JSP Portlet Example</description>
    </meta-info>
    <parameter name="template"
        value="hello.jsp" hidden="false"/>
    <media-type ref="html"/>
</portlet-entry>
    



Copyright © 1999-2002, Apache Software Foundation