BEA Logo BEA WLCS Release 3.5

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLCS Doc Home   |   Migration Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Changes to WebLogic Personalization Server JSP Tag Library

 

This topic includes the following sections:

 


JSP Tag Changes in Version 3.5

This section covers the tags that have been removed from and added to the WebLogic Commerce Server and WebLogic Personalization Server tag libraries.

Removed Tags

One tag has been removed in this release.

All tags that were deprecated in previous releases have now been removed. For more information, see the Note at the top of the section JSP Tag Changes in Version 3.2.

<es:preparedStatement>

The <es:preparedStatement> tag has been removed in this release.

New Ads and Placeholder Tag

Two new tags have been added to create placeholders and query for ad content.

These tags are documented in the "Personalization Server JSP Tag Library Reference" chapter in the Guide to Building Personalized Applications.

<ad:adTarget>

The <ad:adTarget> tag uses the Ad Service to send an ad query to the content management system. Unlike the tag, the query in the <ad:adTarget> tag does not compete with other queries in an ad placeholder.

<ph:placeholder>

The <ph:placeholder> tag implements a placeholder, which describes the behavior for a location on a JSP page.

New Event Tracking Tags

Five new JSP tags have been added to track events.

These <tr*:> tags are documented in the chapter "Events and Behavior Tracking JSP Tag Library Reference" in the Guide to Events and Behavior Tracking.

<tr:clickContentEvent> Content Tag

The <tr:clickContentEvent> tag is used to generate a behavior event when a user has clicked (through) on an ad impression.

<tr:displayContentEvent> Content Tag

The <tr:displayContentEvent> tag is used to generate a behavior event when a user has received (viewed) an ad impression, (typically a .gif image).

<trp:clickProductEvent> Product Tag

The <trp:clickProductEvent> tag is used to generate a behavior event when a user has clicked (through) on a product impression. This tag will return a URL query string containing event parameters. It is then used when forming the complete URL that hyperlinks the content.

<trp:displayProductEvent> Product Tag

The <trp:displayProductEvent> tag is used to generate a behavior event when a user has received (viewed) a product impression, (typically a .gif image).

<trc:clickCampaignEvent> Campaign Tag

The <trc:clickCampaignEvent> tag is used to explicitly generate a clickthrough event relevant to a campaign.

New Webflow Tag

One new tag has been added to the Webflow feature set.

The Pipeline and Webflow tags are documented in the chapter "Webflow and Pipeline JSP Tag Library Reference" of the Guide to Managing Presentation and Business Logic: Using Webflow and Pipeline.

<webflow:setValidated Value>

The tag <webflow:setValidatedValue> is used in a JSP to configure the display of fields in a form that a customer must correct.

Several previously undocumented attributes have been added to the documentation for the <webflow:getValidatedValue> tag.

New E-Business Tag

One tag has been created for the new E-Business tag library.

See the chapter "Product Catalog JSP Tag Library Reference" in the Guide to Building a Product Catalog.

<eb:smnav>

The <eb:> preface stands for E-Business. The Scrollable Model can be use throughout the E-Business package to iterate through a list of objects. It can be used in conjunction with transaction, shopping cart, order history, or shipping services.

Changes to Personalization Tags

<pz:div> and <pz:contentSelector>

The ruleSet attribute has been removed from the <pz:div> tag and the <pz:contentSelector> tag. This attribute was used to defined the URI for the rulesets. In code that already used the ruleSet attribute, the attribute is no longer required and will be ignored.

It is no longer necessary for programmers to define rulesets (or rulesheets) because ruleset names are no longer controlled through the tags. Rules are created using the new GUI tool, E-Business Control Center. The tool saves rules into predefined rulesets in the advislet registry. User classifier rules are saved into the GlobalClassification.xml file. Content selectors are saved into the GlobalContentSelectors.xml file.

 


JSP Tag Changes in Version 3.2

Note: Backward Compatibility Will Stop After Version 3.2. The tag libraries were updated in WebLogic Personalization Server (WLPS) version 3.1 to comply with the JSP 1.1 Specification. If you are upgrading from WebLogic Personalization Server 2.0.1, you can continue to use your existing code with WebLogic Personalization Server 3.2. However, future releases will no longer be backward compatible, so you will need to migrate to the new tags if you intend to continue to use your legacy code with the latest WebLogic Personalization Server releases.

The WebLogic Personalization Server documentation has been revised to reflect the changes to the tag libraries. Until you migrate to the new tags, you can continue to use the WebLogic Personalization Server 2.0 JSP Tag Reference found at http://download.oracle.com/docs/cd/E13210_01/wlcs/p13ndev/jsptags.htm.

WebLogic Personalization Server 3.2 introduces these eight new tags:

<cm:getProperty>

<fm:getApplicationURI>

<fm:getCachedAttribute>

<fm:setCachedAttribute>

<fm:removeCachedAttribute>

<fm:getSessionAttribute>

<fm:setSessionAttribute>

<fm:removeSessionAttribute>

Changes to Content Management Tags in Release 3.2

A new Content Management tag has been added in WebLogic Personalization Server 3.2. In addition, a new attribute has been added to the <cm:printDoc> tag.

<cm:getProperty>

Retrieves the value of the specified content metadata property into a variable specified by resultId. This tag is similar to the <cm:printProperty> tag, with the addition of two new parameters, resultId and resultType.

<cm:printDoc>

A new attribute, baseHref, has been added to the <cm:printDoc> tag. This attribute provides the URL of the document's BASE HREF.

Changes to Utility Tags in Release 3.2

<es:preparedStatement>

The Personalization Utility tag <es:preparedStatement> has a new attribute, transactionIsolationLevel.

Note: This tag is removed from the tag library in WLPS release 3.5.

New Flow Manager Tags in Release 3.2

Seven new tags have been added to support the Flow Manager:

<fm:getApplicationURI>

Gets the Flow Manager.

<fm:getCachedAttribute>

Gets an attribute out of the session/global cache.

<fm:setCachedAttribute>

Sets an attribute in the session/global cache.

<fm:removeCachedAttribute>

Removes an attribute from the session/global cache.

<fm:getSessionAttribute>

Gets an attribute out of the HttpSession.

<fm:setSessionAttribute>

Sets an attribute in the HttpSession.

<fm:removeSessionAttribute>

Removes an attribute from the HttpSession.

 


New JSP Tags Introduced in Release 3.1

Five new tags were introduced in WebLogic Personalization Server Release 3.1:

<ps:getPropertyNames>

<ps:getPropertySetNames>

<i18n:localize>

<i18n:getMessage>

<wl:repeat>

New Property Set Management Tags in Release 3.1

Two new Property Set Management JSP extension tags provide the following services:

The two new Property Set tags are:

<ps:getPropertyNames>

Returns a list of property names for a given property set in a String array.

<ps:getPropertySetNames>

Returns a list of property set names for a given schema group name in a String array.

New Internationalization Tags in Release 3.1

In earlier releases of WebLogic Personalization Server, Internationalization (I18N) was applied from JSP beans that supported sample portal pages, and administration tools pages. The JSP beans employed a simple MessageBundle Java class that allowed access to localized text labels and messages.

For this release, this basic MessageBundle has been extended using a simple framework that is accessible from JSPs via a small I18N extension tag library. The JSP extension tag library provides the following services:

The following new tags are included in the I18N framework:

<i18n:localize>

Allows you to define the language, content type, and character encoding to be used in a page. It also allows you to specify a country, variant, and resource bundle name to use throughout a page when accessing resource bundles via the <i18n:getMessage> tag described below.

<i18n:getMessage>

Retrieves a localized label, or message (based on the absence/presence of an "args" attribute). This tag optionally takes a bundle name, language, country, and variant to aid in locating the appropriate properties file for resource bundle loading.

New WebLogic Utility Tag in Release 3.1

<wl:repeat>

This WebLogic Server tag is used to iterate over a variety of Java objects that includes:

 


Changes to the JSP Tag Library in Release 3.1

The tag libraries have been updated in WebLogic Personalization Server version 3.1 to comply with the JSP 1.1 Specification. If you are upgrading from WebLogic Personalization Server 2.0.1, you can continue to use your existing code with WebLogic Personalization Server 3.1. However, future releases will no longer be backward compatible, so you will need to migrate to the new tags if you intend to continue to use your legacy code with the latest WebLogic Personalization Server releases.

The WebLogic Personalization Server 3.1 documentation has been revised to reflect the changes to the tag libraries. Until you migrate to the new tags, you can continue to use the WebLogic Personalization Server 2.0 JSP Tag Reference located at http://download.oracle.com/docs/cd/E13210_01/wlcs/p13ndev/jsptags.htm.

New JSP 1.1 Naming Conventions

Beginning with WebLogic Personalization Server version 3.1, all tags use the JSP 1.1 naming conventions. Old style tags that were used in previous WebLogic Personalization Server releases have been changed to reflect the new camel case naming conventions.

For example, the old-style tag <um:getgroupnamesforusers> is now <um:getGroupNamesForUsers>.

Old tag names can still be used in the WebLogic Personalization Server 3.1 release. However, old style tag names will not be supported in future releases of WebLogic Personalization Server.

Note: Each time you use a deprecated tag, a message is logged to WebLogic Server. To turn off the deprecation messages, add the following property to weblogiccommerce.properties: commerce.log.display.deprecated=false

For consistency, the Portal Management tags <pt:*> have a new esp: prefix. For example, the old-style tag <pt:eval> is now called <esp:eval>, and the old <pt:portalmanager> is now <esp:portalManager>. When you change to the new prefix, you will need to update each Portal Management tag invocation in the page to use the new prefix.

Note: The es: prefix stands for e-commerce services.
The esp: prefix stands for e-commerce services portal.
The pz: prefix stands for personalization.

Changes to Tag Attributes

The Content Management tags have been changed as follows:

The User Management tags have been changed as follows:

The WebLogic Personalization Server Utility tags have been changed as follows:

Tag attributes require camel casing

All of the tag attributes used in previous WebLogic Personalization Server releases already use the camel-case convention, with a few exceptions. The tags that do not already use camel-cased attributes are the three Advisor tags (formerly called Personalization Advisor) <pz:*>, and the single WebLogic utility <wl:process>.

Table 5-1 lists the attributes that you will need to camel case. Note that all of these attributes are optional, so it is possible that you did not use them in your existing code.

Table 5-1 Camel-cased Attributes

Tag

Attribute

<pz:div>

ruleSet

<pz:contentQuery>

sortBy

contentHome

<pz:contentSelector>

ruleSet

sortBy

contentHome

<wl:process>

notName

notValue


 

New library descriptors

Any JSP migrating from old-style tags to new-style tags will need to point to new library descriptors.

For example:

In the JSP page, <%@ taglib uri="lib/um_tags.jar" prefix="um" %>
would change to <%@ taglib uri="um.tld" prefix="um" %>.

Note: The Personalization Advisor is now simply called the Advisor.
The Advisor <pz:*> tags already use taglib uri="pz.tld", so these do not need to be changed.

The Content Management <cm:*> tags already use taglib uri="cm.tld", so these do not need to be changed.

Global Changes

Tags no longer return primitive types, they only return objects.
For example, <es:counter> used to return an int, and now it returns an Integer object.

Any tags (es, um, wl, etc.) with a <jsp:include page=.../> in their body must be replaced with their scriptlet equivalent. (See Section 5.4.5 of the JSP 1.1 Specification.)

Old Usage:

<es:notNull item="renderer">
<jsp:include page="<%=reconcileFile(request, renderer)%>"/>
</es:notNull>

New Usage:

<% if (renderer != null) { %>
<jsp:include page="<%=reconcileFile(request, renderer)%>"/>
<% } %>

Tag Migration Roadmap

Table 5-2 maps the old tag names to the new JSP 1.1 camel-cased tag names. In addition, changes made to the tags in the WebLogic Personalization Server 3.1 release are noted in the Change column.

Table 5-2 Tag Changes for WebLogic Personalization Server 3.x

Library

Old Style Tag Name

Change

New JSP 1.1 Tag

Advisor

<pz:contentquery>

Camel case

Attribute sortby = sortBy

Attribute contenthome = contentHome

It is no longer necessary to extend the JSP. See below - Note 1: <pz:> tags.

<pz:contentQuery>


<pz:contentselector>

Camel case

Attribute ruleset = ruleSet

Attribute sortby = sortBy

Attribute contenthome = contentHome

<pz:contentSelector>


<pz:div>

ruleset = ruleSet

It is no longer necessary to extend the JSP. See below - Note 1: <pz:> tags.

<pz:div>

Content
Mngmt

---

New

<cm:getProperty>


<cm:printproperty>

Camel case

<cm:printProperty>


<cm:printdoc>

Camel case

New attribute: baseHref

<cm:printDoc>


<cm:select>

No change

<cm:select>


<cm:selectbyid>

Camel case

<cm:selectById>

Flow
Manager

---

New

<fm:getApplicationURI>


---

New

<fm:getCachedAttribute>


---

New

<fm:setCachedAttribute>


---

New

<fm:removeCachedAttribute>


---

New

<fm:getSessionAttribute>


---

New

<fm:setSessionAttribute>


---

New

<fm:removeSessionAttribute>

I18N

---

New

<i18n:initialize>

---

New

<i18n:getMessage>

Property
Set

---

New

<ps:getPropertyName>


---

New

<ps:setPropertyName>

Portal

<pt:eval>

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:eval>


<pt:get>

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:get>


<pt:getgroupsforportal>

Camel case

Change preface pt: to esp:

taglib uri="esp.tld"

<esp:getGroupsForPortal>


<pt:monitorsession>

Camel case

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:monitorSession>


<pt:portalmanager>

Camel case

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:portalManager>


<pt:portletmanager>

Camel case

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:portletManager>


<pt:props>

taglib uri="esp.tld"

Change preface pt: to esp:

<esp:props>

User/
Profile

<um:getprofile>

Camel case

taglib uri="um.tld"

<um:getProfile>


<um:getproperty>

Camel case

taglib uri="um.tldv"

<um:getProperty>


<um:getpropertyasstring>

Camel case

taglib uri="um.tld"

<um:getPropertyAsString>


<um:removeproperty>

Camel case

taglib uri="um.tld"

<um:removeProperty>


<um:setproperty>

Camel case

taglib uri="um.tld"

<um:setProperty>

User/
Group

<um:addgrouptogroup>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:addGroupToGroup>


<um:addusertogroup>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:addUserToGroup>


<um:changegroupname>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:changeGroupName>


<um:creategroup>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:createGroup>


<um:createuser>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:createUser>


<um:getchildgroupnames>

(previously undocumented)

Camel case

taglib uri="um.tld"

<um:getChildGroupNames>


<um:getchildgroups>

Camel case

taglib uri="um.tld"

<um:getChildGroups>


<um:getgroupnamesforuser>

Camel case

taglib uri="um.tld"

<um:getGroupNamesForUser>


<um:getparentgroupname>

Camel case

taglib uri="um.tld"

<um:getParentGroupName>


<um:gettoplevelgroups>

Camel case

taglib uri="um.tld"

<um:getTopLevelGroups>


<um:getusernames>

Camel case

taglib uri="um.tld"

attribute resultId = result

<um:getUsernames>


<um:getusernamesforgroup>

Camel case

taglib uri="um.tld"

<um:getUsernamesForGroup>


<um:removegroup>

Camel case

taglib uri="um.tld"

attribute resultId = result

<um:removeGroup>


<um:removegroupfromgroup>

(previously undocumented)

Camel case

taglib uri="um.tld"

attribute resultId = result

<um:removeGroupFromGroup>


<um:removeuser>

Camel case

taglib uri="um.tld"

attribute resultId = result

<um:removeUser>


<um:removeuserfromgroup>

(previously undocumented)

Camel case

taglib uri="um.tld"

attribute resultId = result

<um:removeUserFromGroup>

User /
Security

<um:login>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:login>

---

New

<um:logout>


<um:setpassword>

Camel case

taglib uri="um.tld"

Attribute resultId = result

<um:setPassword>


WLPS
Utilities

<es:condition>

Tag no longer supported. Requires manual replacement. See below - Note 2: <es:condition>.


<es:counter>

taglib uri="es.tld"

Attribute id returns an Integer or Long object.

You can no longer change the value of the counter variable "id". See below - Note 3: <es:counter>.

Optional attribute type can be long or Long or Integer or if not specified is assumed to be Integer.

<es:counter>


<es:date>

taglib uri="es.tld"

<es:date>


<es:foreachinarray>

Camel case

taglib uri="es.tld"

Attribute array must be a run-time expression (<%=expression%>)

Attribute counterId returns an Integer object (use id.intValue())

<es:forEachInArray>


<es:isnull>

Camel case

taglib uri="es.tld"

Attribute id = item

Attribute item must be a run-time expression.

An empty string is now treated as a value. (An empty string is not null.)

<es:isNull>


<es:monitorsession>

Camel case

taglib uri="es.tld"

<es:monitorSession>


<es:notnull>

Camel case

taglib uri="es.tld"

Attribute id = item

Attribute item must be a run-time expression.

An empty string is now treated as a value. (An empty string is not null.)

<es:notNull>


<es:preparedstatement>

Camel case

taglib uri="es.tld"

Add two new scriptlets.
See below - Note 4: <es:preparedStatement>.

Attribute pool no longer supported.
See below - Note 4: <es:preparedStatement>.

<es:preparedStatement>


<es:simplereport>

Camel case

taglib uri="es.tld"

Attribute resultSet must be a run-time expression.

<es:simpleReport>


<es:transposearray>

Camel case

taglib uri="es.tld"

Attribute array must be a run-time expression.

<es:transposeArray>


<es:usertransaction>

Tag no longer supported. Replace with new scriptlets. See below - Note 5: <es:usertransaction>.


<es:uricontent>

Camel case

taglib uri="es.tld"

<es:uriContent>

WLS
Utilities

<wl:process>

taglib uri="weblogic.tld"

notname = notName

notvalue = notValue

<wl:process>

---

New

<wl:repeat>


 

Additional Notes About JSP Tags

Note 1: <pz:> Tags

To use the <pz:div> and <pz:contentSelector> tags, you no longer need to have the JSP extended. You are no longer required to insert the following directive into your code:

 <%@ page extends="com.beasys.commerce.axiom.p13n.jsp.P13NJspBase" %>.

(If you have already added this code, it does no harm to leave it.)

Note 2: <es:condition>

The <es:condition> tag is no longer supported. Replace it manually with a scriptlet, creating your own if statement.

Old Usage

<es:condition test="schemaPortletNames.length>0"> </es:condition> 

New Usage

<% if (schemaPortletNames.length>0) { %>
<% } %>

Note 3: <es:counter>

If you were manipulating the counter variable within the <es:counter> tag, you will now need to use a scriptlet instead.

Old Usage

<es:counter id="colIter" minCount="0"
maxCount="<%=numOfCols%>">
colIter++;
</es:counter>

New Usage

<% 
for (int colIter = 0; colIter<numOfCols; colIter++) {
colIter++;
}
%>

Note 4: <es:preparedStatement>

The new <es: preparedStatement> tag includes two new scriptlets. In addition, this tag no longer supports the "pool" attribute. (The pool defined in commerce.propeties as "commerce.jdbc.pool.name" is used for connections.)

Old Usage

<es:preparedstatement id="ps" sql"<%=bookmarkBean.QUERY%>" pool="commercePool">
<%
bookmarkBean.createQuery(ps, owner);
java.sql.ResultSet resultSet = ps.executeQuery();
bookmarkBean.load(resultSet);
%>
</es:preparedstatement>

New Usage

<es:preparedStatement id="ps" sql="<%=bookmarkBean.QUERY%>">
<%@ include file="startPreparedStatement.inc" %>
<%
bookmarkBean.createQuery(ps, owner);
java.sql.ResultSet resultSet = ps.executeQuery();
bookmarkBean.load(resultSet);
%>
<%@ include file="endPreparedStatement.inc" %>
</es:preparedStatement>

Note 5: <es:usertransaction>

The old <es:usertransaction> tag is no longer supported. The following code illustrates how to create equivalent functionality.

Old Usage

<es:usertransaction> 
---- body of page --------
</es:usertransaction>

New Usage

<% 
setSessionValue(com.beasys.commerce.axiom.jsp.JspConstants.
USER_TRANS_TIMEOUT, "500",request);
// tx timeout defaults to 600 sec. without above line
%>
<%@ include file="startUserTransaction.inc" %>
---- body of page --------
<%@ include file="endUserTransaction.inc" %>

 

back to top previous page