Develop > Presentation layer > Work with Web service feeds > Feed formatting JSP files for Atom feeds
Example of an e-Marketing Spot Atom feed rendered in a feed reader and a remote widget
An Atom feed for an e-Marketing Spot provides text and images for display in both feed readers and remote widgets.
To customize the feed formatting JSP files for the Atom feed, understand how the XML elements in the JSP files map to the text and images a customer sees in a feed reader or remote widget.
The following two examples illustrate how the same e-Marketing Spot feed is rendered in a feed reader and in a remote widget. The example feed is for a Web activity displaying a selection of catalog entries that are the "Deals of the Week." Both examples use the same set of feed formatting JSP files. These feed formatting JSP files are the default set WebSphere Commerce provides for e-Marketing Spots.
Example 1: An e-Marketing Spot feed rendered in a feed reader
This example shows the e-Marketing Spot feed rendered in a browser that supports the display of Atom feeds. Keep in mind that each browser or feed reader displays a certain set of Atom elements from the feed, arranged a certain way. Therefore, the results might not be consistent from one browser or feed reader to the next. The numbered callouts in the screen capture show the data from the e-Marketing Spot Atom feed that this particular browser displays:
Feed data Type of data Atom element Feed formatting JSP file that contains this element 1 Title of feed <title> SerializeMarketingSpotDataAtom.jspf This JSP fragment looks for a title key (feed_<eMarketingSpotName>_title) in the following properties file:
WCDE_INSTALL\workspace\Rest\src\com\ibm\commerce\stores\atom\eSpotAtomFeedText_en_US.properties
If the properties file does not specify the feed title, then the e-Marketing Spot name in Management Center is used.
2 Catalog entry name <title> SerializeMarketingSpotDataCatalogEntryAtom.jspf 3 Feed current date and time <updated> 4 Catalog entry thumbnail image <content> 5 Catalog entry short description 6 Catalog entry list price 7 Catalog entry offer (standard) price
Example 2: E-Marketing Spot feed rendered in a remote widget
This example shows an e-Marketing Spot remote widget created in the KickApps App Studio using a WebSphere Commerce template. In this case, the template specifies which elements from the feed to display. The numbered callouts in the screen capture show the data coming from the e-Marketing Spot Atom feed. The text and images that are above and below the feed data are editable parts of the widget template.Notice that although the remote widget displays data that is similar to the feed reader result, the remote widget does not use the <content> element for each feed entry. (Compare the Atom element columns in the two tables). Instead, the WebSphere Commerce remote widget templates use Atom extension elements that are also provided in the feed formatting JSP file. These extension elements provide more granular feed entry data for display in Flash widgets. This makes it easier to edit and rearrange the data in the widget. If you are customizing a feed formatting JSP file to add an additional piece of data from the e-Marketing Spot to a feed for a remote widget, add a new Atom extension element.
Feed data Type of data Atom element Feed formatting JSP fragment 1 Title of feed <title> SerializeMarketingSpotDataAtom.jspf This JSP fragment looks for a title key (feed_<eMarketingSpotName>_title) in the following properties file:
WCDE_INSTALL\workspace\Rest\src\com\ibm\commerce\stores\atom\eSpotAtomFeedText_en_US.properties
If the properties file does not specify the feed title, then the e-Marketing Spot name in Management Center is used.
2 Catalog entry thumbnail image Atom extension element: <thumbnail>
SerializeMarketingSpotDataCatalogEntryAtom.jspf 3 Catalog entry name Atom extension element: <name>
4 Catalog entry offer (standard) price Atom extension element: <price>