Develop > Presentation layer > Work with JSP pages


WebSphere Commerce JSP viewer

Use the JSP viewer, formerly named the JSP preview environment, to view the JSP files without its required underlying Java code. The JSP viewer allows JSP developers and Java developers to work simultaneously instead of consecutively: JSP developers do not have to wait for necessary Java code to start developing their pages.

The WebSphere Commerce JSP viewer is composed of the following components:


Web controller

The Web controller in the JSP viewer provides JSP pages with linkages to other JSP pages. Without a WebSphere Commerce environment, the HTML links in the JSP pages would not work. The Web controller mimics WebSphere Commerce run time using a XML configuration file, allowing you to see the JSP pages and simulated store flow without running any business logic. As a result, you can get an early estimation of coding effort and design problems.


useBean tag library

In the JSP viewer, the useBean tag library provides JSP pages with data that is pulled from an XML file. In the WebSphere Commerce environment, it instantiates and activates WebSphere Commerce beans, enabled using JavaServer Pages Standard Tag Library ( JSTL) technology. All JSP pages in the WebSphere Commerce starter stores use this technology.

The tag library is a wrapper to an XML parser that reads in a definition for a data bean and then re-creates that data bean with a series of lists and maps, which is then placed into the proper JSP page scope outlined by the developer. The BeanLocation.XML file provides the mapping between the bean ID and the XML file. Pages that use the same data bean end up with the same data set.


XMLGenerator

The XMLGenerator is a data bean to XML generator that is capable of creating XML files for a given WebSphere Commerce data bean.

To generate the XML file, have a populated data bean or a stubbed out data bean. The generator starts populating every method on the data bean and checks the results. This population process is done automatically when using the preview tool. In the case of a WebSphere Commerce bean (the one to be populated), set parameters. In the case of a stubbed data bean, you do not have to set parameters. The XMLGenerator also performs the following tasks:


Related concepts

WebSphere Commerce development environment


Related tasks

Create XML files using the XMLGenerator


+

Search Tips   |   Advanced Search