Representing view implementations: action-mappings and global-forwards

Describing device-specific and store-specific view implementations, accomplished in earlier versions of WebSphere Commerce using the VIEWREG database table, is accomplished in the WebSphere Commerce Web application with a combination of action-mappings and global-forwards elements.

About this task

Consider the four associations represented in the following table:

View name Device format ID Store ID View command interface View command implementation class Properties HTTPS Credentials Accepted
AddressBookForm -1 0 docname= Address-BookForm.jsp 0 NULL
AddressBookForm -1 201 command.ForwardViewCommand docname=UserArea/AccountSection/AddressbookSubsection/AddressBookForm.jsp 1 P
GenericPassword-ErrorView -1 0 docname=Generic-Application-Error.jsp&storedir=no 0 NULL
CompleteOrderView -3 201 MessagingViewCommand docname=CompleteOrder.jsp 0 NULL
Device format ID
The identifier of the device to which the view will be sent. The default device format is -1, which represents an HTTP Web browser.
Store ID
The store reference number for this URI or 0 to mean any store.
Name-value pairs used by this view, in the form of an HTTP request query string.
The value of 1 indicates that the request was expected to be received on a secure channel (HTTPS) and a redirect to the SSL port will be issued if it has been received on an insecure channel (HTTP).
Credentials Accepted
The value of P indicates that partially authenticated users are entitled to access this resource.
The following configuration fragment describes the first three associations:

  <forward name="AddressBookForm" path="/AddressBookForm.jsp"/>
  <forward className="" name="AddressBookForm/201" 
    <set-property property="resourceClassName" value="" />
  <forward className="" name="GenericPasswordErrorView" 
    <set-property property="properties" value="storeDir=no" />
    <set-property property="resourceClassName" value="" />
<action-mappings type="">         
  <action path="/AddressBookForm" type="">
    <set-property property="https" value="0:0,201:1" />
    <set-property property="credentialsAccepted" value="201:P" />
  <action path="/GenericPasswordErrorView" type="" />
  • The value of the className attribute of the forward elements.
  • The syntax of the name attribute of the forward elements: a docname/ storeID pair, whose second constituent defaults to 0.
  • The use of the resourceClassName property to specify the view command implementation class, whose value defaults to
  • You can also set the authenticate property for views, with the same syntax and semantics as for URLs (described in the preceding section).
  • The final row of the preceding table represents a messaging view, which is an example of a view that is not intended to be rendered by a browser and requires variant syntax to specify the device type as well as special properties to specify the implementation for generating the response:
      <forward className="" name="CompleteOrderView/201/-3" path="/AuctionArea/Messages/CompleteOrder.jsp">
        <set-property property="implClassName" value=""/>
        <set-property property="interfaceName" value=""/>
    <action-mappings type="">         
      <action path="/CompleteOrderView" type="" />
  • The extension to the syntax of the name attribute of the forward element: a docname/ storeID / deviceFormatID triplet, whose third constituent defaults to -1.
  • To identify the correct values for the messaging composition service refer to Creating an outbound message.
  • The use of the implClassName property to specify the view command implementation class and of the interfaceName property to specify the view command interface. Only use this property to define access control policies based on view implementations, it is provided for compatibility with previous versions of WebSphere Commerce.