In the previous step of the tutorial, Creating an e-Marketing Spot in the WebSphere Commerce Accelerator, you created the e-Marketing Spot in the WebSphere Commerce Accelerator.
However, the SubCategoriesDisplay.jsp file is called by several portlets. The portlet.xml file defines which portlets are mapped to which JSP files. Since we only want the e-Marketing Spot to display in the Women's Fashion portlet we must update the portlet.xml file.
To edit the portlet.xml file, do the following:
- Locate the portlet.xml file
- In the Project Navigator, locate the portlet project you created when you installed and configured the development environment.
- Expand the project > WebContent > WEB-INF.
- In the Project Navigator, locate the portlet project you created when you installed and configured the development environment.
- Open portlet.xml. The file displays in the main pane. Select the Source view.
- Find the following code:
<concrete-portlet href="#com.ibm.commerce.portal.WCSPortalNameSpace.Portlet2">
<portlet-name>Women's Fashions</portlet-name>
- In the Women's Fashions portlet (the section that follows), find the following:
<param-name>InitialRemoteURL</param-name>
<param-value>https://hostname/webapp/wcs/stores/servlet/CategoryDisplay?catalogId =catalogID&storeId=storeID&categoryId=categoryID&langId=-1</param-value>
- Add the following to the end of the URL:
&testSample=true.
- Save your changes.
- Find the following code:
- In the Project Navigator, locate the portal project you created when you installed and configured the development environment.
- Right click on the project. From the menu, select Run on Server. The Server Selection window displays.
- Select the WebSphere Portal server. Click Finish. When the server finishes running, the Winstons store displays in the Web browser.
- The Winstons store that you are viewing is the consumer direct Commerce Enabled Portal starter store. Select the Fashion tab.
- Navigate to the Womens Fashions portlet. Notice that a short skirt now displays at the top of the portlet. This is the e-Marketing Spot you added. Click the short skirt to see the product.
Congratulations! You have now completed the tutorial.