Samples >
JSP code snippets
A JSP code snippet is a code sample that shows you how to add WebSphere Commerce functionality to the store. JSP code snippets may be added to a starter store, or to a store previously published and migrated. JSP code snippets are intended to help you: Quickly add a feature to the store, or add a feature that is not included in one of the starter stores. JSP code snippets use the JSP Standard Tag Library (JSTL). Each JSP code snippet is well commented, easy to read, easy to understand, and easy to customize.
- JSP code snippet: Display customization terms and conditions
The CustomizationTCDisplay.jsp file displays the customization information according to the display customization terms and conditions for the a user's current session logon ID, store ID, and the selected language ID.
- JSP code snippet for e-Marketing Spots (WebSphere Commerce Accelerator)
This eMarketingSpotDisplay.jsp is built as a sample snippet to display an e-Marketing Spot in a store page. This e-Marketing Spot code supports all types of Web activities.
- JSP code snippet for e-Marketing Spots (Management Center)
Use the WebServiceeMarketingSpotDisplay.jsp sample snippet to display an e-Marketing Spot in a store page. The code uses Web services to call the marketing runtime to get the data to display in the e-Marketing Spot. Use this snippet for e-Marketing Spots that are used in Web activities managed with the Management Center.
- JSP code snippet: Store catalog display
This JSP code snippet displays all available catalogs (master catalog and sales catalogs) associated with a store. It uses the StoreDataBean to retrieve all the CatalogDataBeans that contain the catalog information.
- JSP code snippet: Promotions display
This JSP code snippet displays all of the available discounts associated with a particular category or catalog entry. It uses the CalculationCodeListDataBean to retrieve all of the CalculationCodeDataBeans in order to get the required information.
- JSP code snippet: Promotion code form
This JSP code snippet displays the following information: the order list and the discounts applied, the promotion code form that allows customers to enter a promotion code, the list of promotion codes entered (for each code, a 'Remove' button is provided to allow customers to remove the code).
- Sample JSP code: e-mail template
Use this sample JSP code snippet as a starting point to create custom e-mail templates for marketing e-mail activities. Creating a template using this JSP code snippet is an alternative to having business users create a template using the WebSphere Commerce Accelerator or Management Center user interface.
- JSP code snippet: Catalog attachments display
This JSP code snippet displays product attachments on the pages in which you include this snippet.
- JSP code snippet: SecureThreeDACSForm.jsp
This JSP code snippet displays the password input form a cardholder uses to enter his password in this page. After entering the password, the cardholder clicks 'Submit' to verify the Payer Authentication.
- JSP code snippet: SecureThreeDDisplay.jsp
This JSP code snippet displays waiting page when the server is processing a 3-D Secure request. It displays a password request page and asks the shopper to enter the password of the credit card if the credit card is enrolled for 3-D Secure service.
- JSP code snippet: SecureThreeDCTFError.jsp
This JSP code snippet is used to send null content back to the Visa Certificate Test Facility (CTF). (This file will only be used when doing CTF test with Visa.)
- JSP code snippet: SecureThreeDCacheDisplay.jsp
This JSP code snippet displays the SecureThreeDCacheCmd refresh link (such as 'stop', 'start', 'update', 'reset' button). Note that the function of caching of card range is not currently supported.
- JSP code snippet: SecureThreeDError.jsp
This JSP code snippet displays detailed error information for errors occurring during 3-D Secure service.
- Sample: EdpJspCodeSnippetText_en_US.properties file
The EdpJspCodeSnippetText_en_US.properties file provides translatable text for JSP snippets that display various payment methods.
Related concepts
Related reference
WebSphere Commerce JSP programming best practices
Related information
Tutorial: Customizing the consumer direct sample store using snippets