Develop > Presentation layer > Work with JSP pages > Storefront customization tools > Web application


Map URLs to controller commands: action-mappings

Associate a URL with a controller command interface, accomplished in earlier versions of WebSphere Commerce using the URLREG database table, is accomplished in the WebSphere Commerce Web application with action-mappings elements.

Consider the three associations represented in the following table:

URL Store ID Controller command interface HTTPS Authenticate Credentials Accepted
StoreCatalogDisplay 0 com.ibm.commerce. catalog.commands. StoreCatalogDisplayCmd 0 0 NULL
AddressAdd 0 com.ibm.commerce. usermanagement.commands. AddressAddCmd 0 0 NULL
AddressAdd 201 com.ibm.commerce. usermanagement.commands. AddressAddCmd 1 1 P

Where:

URL

The URL name.

Store ID

The store reference number for this URI or 0 to mean any store.

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).

Authenticate

The value of 1 indicates that user logon is required for this URI. Only non-guest, non-generic users are allowed to access pages with Authenticate=1.

Credentials Accepted

The value of P indicates that partially authenticated users are entitled to access this resource.

The following action-mappings configuration element describes these associations:

<action-mappings type="com.ibm.commerce.struts.ECActionMapping">         

  
<action path="/StoreCatalogDisplay" 
           parameter="com.ibm.commerce.catalog.commands.StoreCatalogDisplayCmd" 
           type="com.ibm.commerce.struts.BaseAction" />

  
<action path="/AddressAdd" 
           parameter="com.ibm.commerce.usermanagement.commands.AddressAddCmd" 
           type="com.ibm.commerce.struts.BaseAction">        
<set-property property="https" value="0:0,201:1" />        
<set-property property="authenticate" value="201:1" />        
<set-property property="credentialsAccepted" value="201:P" />   
</action>

</action-mappings>

Note in particular:


+

Search Tips   |   Advanced Search