Jetspeed

Essentials

Get Involved

Documentation

Components

WebPagePortlet

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


Description

Present a web page in a portlet.

The web page will be loaded by the Jetspeed server, not the user's web browser, and maintained by the cache subsystem. Since Jetspeed is loading the page, no information from the user's browser, like cookies, will be provided to the web server.

The WebPagePortlet will convert, or delete, some of the HTML tags so the resulting page can be presented in a portlet.

Supported Media Types

Description of Media Types.

  • html



Element: parameter

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

This element is optional.

Parameters common to many portlets.

Parameter Name Description
dont_remove_applet <APPLET> tag. Used to include a Java Applet. The space allocate on the web page for the applet will be available for other HTML tags, thus the appearance of the resulting page will be different.
  If not present, "no" is the default value
Value Description
yes Include the Java applets in the portlet
no Remove Java applets
dont_remove_head <HEAD> tag.
  If not present, "no" is the default value
Value Description
yes The <HEAD> tags are retained
no The <HEAD> tags is removed
dont_remove_meta <META> tag.
  If not present, "no" is the default value
Value Description
yes <META> tags are retained
no <META> tags are removed
dont_remove_noscript <NOSCRIPT> tag.
  If not present, "no" is the default value
Value Description
yes <NOSCRIPT>tags are retained
no <NOSCRIPT> tags are removed
dont_remove_onsomething <Retain onBlur, onChange, ... attributes> in tag.
  If not present, "no" is the default value
Value Description
yes Retain attributes
no Remove attributes
dont_remove_object <OBJECT> tag.
  If not present, "no" is the default value
Value Description
yes <OBJECT>tags are retained
no <OBJECT> tags are removed
dont_remove_script <SCRIPT> tag.
  If not present, "no" is the default value
Value Description
yes <SCRIPT> tags are retained
no <SCRIPT> tags are removed
dont_remove_style no
  If not present, "no" is the default value
Value Description
yes <STYLE> tags are retained
no <STYLE> tags are removed


Element: url

Contains the URL of the web page to be displayed.

This element is required.

General information about of URL.

Good URLs:

<url>http://jakata.apache.org/jetspeed</url>
Basic URL
<url>http://search.yahoo.com/bin/search?p=jetspeed</url>
1 Parameter passed
<url>http://search.yahoo.com/search?p=jetspeed&amp;n=100</url>
2 Parameter passed

Bad URLs:

<url>index.html</url>
No protocol, http:// or hostname
<url>http://search.yahoo.com/search?p=jetspeed&n=100</url>
Contains & instead of &amp;.


Example of Registry Entry

The example will place the results of a Yahoo search on "jetspeed" in a portlet.

From <jetspeed_home>/WEB-INF/conf/local-portlets.xreg

<portlet-entry name="JetspeedInYahoo" hidden="false" type="ref"
   parent="WebPagePortlet" application="false">
   <meta-info>
       <title>JetspeedInYahoo</title>
       <description>References to Jetspeed in Yahoo</description>
   </meta-info>
   <parameter name="dont_remove_applet" value="yes" hidden="false"/>
   <parameter name="dont_remove_script" value="yes" hidden="false"/>
   <url>http://search.yahoo.com/bin/search?p=jetspeed</url>
</portlet-entry>


Know problems (version 1.3a1)

  • Some <META> may cause errors and prevent the portlet from being displayed
  • Some JavaScript may cause errors and prevent the portlet from being displayed


Questions and possible problems to be investigated (version 1.3a1)

  • Property "dont_remove_head does" not seem to work. Head tag is always removed
  • Can values in the HTTP Request be set, i.e. User-Agent...? This would allow a "Netscape 4" or "IE 5" only site to get browser specific pages from the web server
  • Cookie support?
  • "dont_remove_script" does not appear to work
  • Why use "dont_remove_head"?
  • Why use "dont_remove_meta", how is it related to "dont_remove_head"?
  • Frame support?



Copyright © 1999-2001, Apache Software Foundation