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:getPreferences> tag returns all the values of a given preference. Use this tag to get all the values of a preference, given the name of the preference. The tag may also supply a default value. If the named preference value does not exist, this tag returns the supplied default value.
<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. You can specify multiple default values separated by the given separator (used the separator attribute). For example, if a preference has two values, "blue" and "black", this attribute may be specified as "blue,black" with the separator as "," or "blue</td><td>black" with the separator as "</td><td>".
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 with the values separated by the separator.
separator
Optional (String) - If a defaultValue is specified, specify the text that will separate multuple values. If the var is not specified, the separator is used to separate multiple values.
<td>downloadFolder</td>
<pref:getPreferences name="downloadFolder" var="downloadFolder" separator="} {"/>
<td><%for(int i = 0; i < downloadFolder.length; i++) {
%>{<%=downloadFolder[i]%>} <%}%></td>
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.