Tutorial: Modifying the storefront to display Recipe information
This tutorial demonstrates how to modify the storefront to display a new Recipes section.
In Tutorial: Creating the Project BOD service module, you implemented the server-side modifications needed to support a Recipes noun. The next step is to modify the storefront to reflect these changes, so that visitors can view recipe information from the store home page.
Learning objectives
After completing this tutorial we will have learned how to:
- Create a get-data-config file to process service requests.
- Create and register new storefront JSPs files.
- Modify existing JSP files to interact with the new JSP files.
- Retrieve and display custom data using the getData tag.
- Extend the store properties file to include new definitions.
Time required
This tutorial takes approximately 2 hours to finish.
Skill level
Advanced
Audience
This tutorial is intended for developers who are customizing the storefront of their WebSphere Commerce store.
System requirements
The system requirements for this tutorial are unchanged from Tutorial: Adding a Recipes tool to the Management Center.
Prerequisites
This tutorial is the fourth tutorial in a series of five. Complete the following tutorials before proceeding with this one:
- Tutorial: Creating the Project BOD service module
- Tutorial: Adding a Recipes tool to the Management Center
- (Optional) Tutorial: Supporting extended sites in the Recipes tool
To complete this tutorial, be familiar with the following terms and concepts:
- XML
- JSP files
Lessons in this tutorial
- Create new expression builders to process Recipe service requests
In this lesson, we will create expression builders that allow the storefront to access the Recipe and RecipeCollection objects. The get-data-config.xml file contains expression builders, each represents a different SQL query defined in the Recipe Project's query template file. By referencing the appropriate expression builder, getData tags in the storefront JSPs files can retrieve specific data from the database.
- Create and registering new storefront JavaServer Pages files
In this lesson, we will create new JSPs files to display a new Recipes section in the storefront.
- Modify existing JSPs files to interact with the new Recipe JSP files
This lesson modifies the store's category banner and product display pages to link to recipes.