Creating and registering a serialization JSP file for the campaign element
Create and register a serialization JSP file to take the authoring elements from the DMELEMENT and DMELEMENTNVP tables for your new campaign element and display them in the Management Center user interface. Business users can then set the properties for the campaign element in marketing activities.
About this task
When a business user opens an activity, the parent serialization JSP file, GetActivityChildren.jsp, calls the serialization JSP file for each campaign element to load the data for the activity.
If the object definition for your new campaign element includes wcfChildObjectDefinitions or wcfReferenceObjectDefinitions, you must create a new serialization JSP file for your new campaign element; otherwise, you can use the existing generic serialization JSP file, SerializeActivitygenericElement.jsp, as is. In both cases, you must register the serialization JSP file in the Struts configuration file for customization, struts-extension.xml. This file is initially empty and takes precedence over all Struts configuration files.
Procedure
- Open HCL Commerce Developer and switch to the Enterprise Explorer view.
-
If you need a new serialization JSP file, complete the following steps; otherwise, skip to step
3:
-
Open the Spring configuration file, spring-extension.xml.
The file is stored at this path:
LOBTools/WebContent/WEB-INF
-
Add a new action mapping to register the serialization JSP file:
- If you created your own serialization JSP file, your action mapping should use the following
syntax:
<action path="/SerializeActivityElement-objectType_value" include="/jsp/your_company_name/marketing/name_of_serialization_jsp_file.jsp" />
where
objectType_value
is the value of the objectType attribute defined in the object definition for this campaign elementname_of_serialization_jsp_file
is the name you gave to the custom serialization JSP file for your new campaign element in an earlier step of this procedure.
- If you are using the generic serialization JSP file, your action mapping should use the
following
syntax:
<action path="/SerializeActivityElement-objectType_value" include="/jsp/commerce/marketing/restricted/SerializeActivitygenericElement.jsp" />
where
objectType_value
is the value of the objectType attribute defined in the object definition for this campaign element.
Here are a couple of tips:- If you copied code from an existing serialization JSP file, you must update the paths as appropriate for any included JSP files.
- If you change your serialization JSP file, make sure to edit the GetActivityChildren.jsp file. You do not need to make any changes to the GetActivityChildren.jsp file; just save it to change the file modification timestamp. The GetActivityChildren.jsp file includes the serialization JSP files, so this will ensure that your serialization JSP file changes are picked up.
- If you created your own serialization JSP file, your action mapping should use the following
syntax:
- Restart the HCL Commerce test server to make the new configuration available.