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.

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 com.ibm.commerce.command.ForwardViewCommand com.ibm.commerce.command.HttpForwardViewCommandImpl docname= Address-BookForm.jsp 0 NULL
AddressBookForm -1 201 com.ibm.commerce. command.ForwardViewCommand com.ibm.commerce.command.HttpForwardViewCommandImpl docname=UserArea/AccountSection/AddressbookSubsection/AddressBookForm.jsp 1 P
GenericPassword-ErrorView -1 0 com.ibm.commerce.command.ForwardViewCommand com.ibm.commerce.command.HttpForwardViewCommandImpl docname=Generic-Application-Error.jsp&storedir=no 0 NULL
CompleteOrderView -3 201 com.ibm.commerce.messaging.viewcommands. MessagingViewCommand com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl docname=CompleteOrder.jsp 0 NULL
Where:

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.

Properties

Name-value pairs used by this view, in the form of an HTTP request query string.

HTTPS

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
<global-forwards>

<forward name="AddressBookForm" path="/AddressBookForm.jsp"
/>
<forward className="
com.ibm.commerce.struts.ECActionForward" 
         name="AddressBookForm
/201" 
        
path="/UserArea/AccountSection/AddressbookSubsection/AddressBookForm.jsp">
  <set-property property="
resourceClassName" 
               
value="com.ibm.commerce.command.HttpForwardViewCommandImpl" />
</forward>
<forward className="
com.ibm.commerce.struts.ECActionForward" 
         name="GenericPasswordErrorView" 
         path="/GenericApplicationError.jsp">
  <set-property property="properties" value="storeDir=no" />
  <set-property property="
resourceClassName" 
               
value="com.ibm.commerce.command.HttpForwardViewCommandImpl" />
</forward>

</global-forwards>
<action-mappings
type="com.ibm.commerce.struts.ECActionMapping">         
   <action path="/AddressBookForm" 
                type="com.ibm.commerce.struts.BaseAction">
          <set-property property="https" value="0:0,201:1" />
          <set-property property="credentialsAccepted"
value="201:P" />
        </action>
   <action path="/GenericPasswordErrorView" 
                type="com.ibm.commerce.struts.BaseAction" />
</action-mappings>
Notes: