When you create a portlet with the WebLogic Workshop Portal Extensions Portlet Designer, you can add different preferences to it that help control the portlet's content and behavior (choose Insert-->New Preference). The portlet preferences JSP tags let you expose those preferences to end users, letting them view and set preferences.
The <pref:getPreference> tag returns the value of a given preference. Use this tag to get the value of a preference, given the name of the preference. The tag may also supply a default value for the value of the tag. If the named preference does not exist, this tag returns the supplied default value. If the named preference has more than one value, the tag returns the first value (no guarantee of order).
<tagName attribute="value" />
name
Required (String) - The name of the portlet preference.
defaultValue
Optional (String) - The default value of the preference. If the given preference has no value, the value you enter is used as the default value. If this attribute is not set, an empty string is used as the default value.
var
Optional (String) - The variable to assign the value to. This tag sets a java.lang.String value in the PageContext with the given var name. If this attribute is not set, the value of the preference is written to the underlying response.
<pref:getPreference name="ContentURL" var="ContentURL" />
The Portal Samples contain examples of portlet preference JSP tags. In the Sample Portal, the RSS RSS News Feed Portlet uses the JSP tags, and the Tutorial Portal contains a Portlet Preferences page.