Portlet Configuration How To JSP

JSP

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

Present the output of a JSP in a portlet.

Why use a JSP portlet instead of a WebPagePortlet?

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

Description of Media Types.

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
HelloJSP Simple JSP Portlet Example

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.