In order to allow users to browse through your catalog of products, you need to create pages that display information about the various categories and products you sell. You could create a separate JSP for every single product, but this would be inefficient. Each time you create a new product or remove one from your catalog, you would have to make modifications.

The catalog is organized by product type. Users can navigate the catalog by drilling down through the various categories. For Motorprise, we created generic template pages for product categories and for products. These templates are simply JSPs that display general information about one category or one product.

The templates are general and data-driven, rather than being hard-coded for a specific product or category. All of the information they display comes from the repository. These general, dynamic pages are convenient because, once they are written, you can use them to display any category or product in a product catalog. For example, a very simple site could have one category template page file and one product template page file. Because these pages are dynamic, they are easy to maintain. As you add more products to your repository, you don’t necessarily have to change the catalog template pages.

We created a general product template page in Motorprise, MotorpriseJSP/j2ee-apps/Motorprise/web-app/en/catalog/product.jSP, to display any product. It takes the ID of the product and displays all of its relevant information using different components and page templates. The following information is available for each product: