Jetspeed

ApacheCon US 2003 -- Join US!

Essentials

Download

Documentation

Components

Translated

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.

To use Jetspeed TagLibs, the following must appear in the JSP.
<%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>

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
jetspeed:uriLookup Return value of uriLookup
Value Description
Customize Link to the Customizer
EditAccount Link to edit the current user's account
Login Link to login a user
Logout Link to logout the current user
Home Link to this Jetspeed installation's Home Page
jetspeed:contentUri Return value of contentUri
Value Description
apidocs Link to the Jetspeeds JavaDocs
docs Link to the Jetspeed Documentation
rss Link to RSS files


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>
    


Example of Portlets

Jetspeed include the following example of JSP porlets.

Portlet Name Description
HelloJSP Basic JSP portlet
JSP1_1andJetspeedTagLib Displays data from the servlet 1.1 request class and data from the Jetspeed TagLib.
JSP1_2andJetspeedTagLib Displays data from the servlet 1.2 request class and data from the Jetspeed TagLib. This portlet will NOT work with Tomcat v3.x, or any other Servlet 1.1 container.



Copyright © 1999-2003, Apache Software Foundation