If the default feed formatting JSP files for e-Marketing
Spots, wish lists, and gift registries do not meet your business needs,
you can create a custom set. By customizing these files, you have
more control over the feed data available for display in remote widgets
and feed readers. For example, you can change the number of feed entries
to include in the feed, or add additional pieces of store data to
the feed, if the data is available from the web service. When you
have completed the customization, you must register the top-level
feed formatting JSP file in a Struts configuration file.
Before you begin
Review the following topics to understand the purpose and
function of feed formatting JSP files and the Struts configuration
file:
Procedure
- Open
WebSphere Commerce Developer and switch to the Enterprise Explorer
view.
- Create a directory in which to store your custom set of
JSP files at the following path:
WCDE_installdir/Rest/WebContent/atom/
For example:
WCDE_installdir/Rest/WebContent/atom/MyCustomFeedJSPs/
- Copy the full set of default feed formatting JSP files
that you want to change to your new directory.
The available
sets are:
Set |
Location of default files |
Names of files in the set |
E-Marketing Spot feed formatting JSP file set |
WCDE_installdir/workspace/Rest/WebContent/atom/site-default/ |
SerializeShowMarketingSpotDataDataAreaTypeAtom.jsp SerializeMarketingSpotDataAtom.jspfSerializeMarketingSpotDataCatalogEntryAtom.jspfSerializeMarketingSpotDataCatalogGroupAtom.jspf SerializeMarketingSpotDataContentAtom.jspf Plus: FeedEnvironment.jspf |
Wish list feed formatting JSP file set |
WCDE_installdir/workspace/Rest/WebContent/atom/site-default/ |
SerializeShowGiftListDataAreaTypeAtom.jspSerializeGiftListDataAtom.jspfSerializeGiftListDataCatalogEntryAtom.jspf Plus: FeedEnvironment.jspf |
- Change any of the JSP files in the set.
- Save your changes.
- Open the Struts configuration file for the RESTful framework
at the following path:
WCDE_installdir/workspace/Rest/WebContent/WEB-INF/struts-extension.xml
- Add a new action mapping to register the top-level feed
formatting JSP file in your new directory.
For example,
to register a customized set of feed formatting JSP files for e-Marketing
Spots located in the
MyCustomFeedJSPs directory,
the new action mapping might look like the following line shown in
bold text:
<struts-config>
<action-mappings type="com.ibm.commerce.foundation.rest.struts.ECRestActionMapping">
<action path="/ShowMarketingSpotDataDataAreaTypeAtom/0" forward="/atom/MyCustomFeedJSPs/SerializeShowMarketingSpotDataDataAreaTypeAtom.jsp" />
</action-mappings>
</struts-config>
- Save and close the Struts configuration file.
- Restart the WebSphere Commerce test server to make the
new configuration available.
-
Test your customized feed formatting JSP files by viewing the feed in various feed readers or
in the widget editor you are using.
- Deploy
your customized code.