Registering commands
When the WebSphere Commerce instance is created commands are loaded into the database by the language-independent bootstrap file. If you create or customize multiple new commands or JSP files for your store, you may want to register them using an XML file, which you can then load into the database using the loading utilities, or as part of a store archive that can be published using the Publish wizard.
About this task
To create an XML file to register the new commands and JSP files for your store:
Procedure
-
Create an XML file that follows the wcs.dtd. The DTD files are located in the following
directory:
- WC_installdir/schema/xml
- WCDE_installdir/schema/xml
- Controller commands must be registered in the Struts configuration files.
-
To register a new controller command, or a new task command, in the CMDREG
table, create an entry in the XML file for each new or customized controller or task commands, using
the following example of a task command as your guide:
<cmdreg storeent_id="@storeent_id_1" interfacename="com.ibm.commerce.payment.commands.DoPaymentCmd" classname="com.ibm.commerce.payment.commands.DoPaymentMPFCmdImpl"/>
Results
Enhancing confidentiality
When WebSphere Commerce receives a URL request, the Web controller retrieves the interface
name for the requested controller command and uses it to look up the implementation class name from
the CMDREG table. It also determines if HTTPS (secured) protocol is required for
the URL request by checking the HTTPS
attribute in the URL configuration.
Any command which displays sensitive information should have the HTTPS
value set
to a value of "1" (one) in the Struts configuration files. For example, an
OrderProcessView
view containing details of a customer order should only be
transmitted over HTTPS protocol, and therefore the OrderProcessView
entry in the
Struts configuration file has a value of "1" (one) in the HTTPS
attribute.