Set up the JSP viewer tool

Before you can view store JSP pages in the JSP viewer, set up the JSP viewer tool.

  1. To install the JSP viewer tool, import the PreviewTool.ear file into a new rational Application Developer workspace as follows:

    1. Start Rational Application Developer and create a new workspace, preview_workspace_dir.

    2. In the J2EE Hierarchy view, right-click Enterprise Applications and select Import.

    3. Enter WCDE_installdir\samples\PreviewTools\JSPPreviewTool\PreviewTool.ear as the requested EAR file. This EAR file contains the code to allow previewing.

    4. Click Finish. You now have a basic installation.

  2. Install the samples:

    1. Locate the SampleXML.zip file in the WCDE_installdir\samples\PreviewTools\JSPPreviewTool directory.

    2. Extract the contents of this file into a temporary directory, temp_dir.

    3. Move the DTD files located in the preview_workspace_dir\wcsstore\imported_classes directory to the preview_workspace_dir\wcsstore\JavaSource directory.

    4. Copy the store_type directory for your store from the temp_dir\classes directory to the preview_workspace_dir\wcsstore\JavaSource directory, where store_type is ConsumerDirectXML, AdvancedB2BDirectXML, or B2BDirectXML.

    5. Copy the store_type_BeanLocation.xml file from the temp_dir\classes directory to the preview_workspace_dir\wcsstore\JavaSource directory and rename the file to BeanLocation.xml.

    6. Copy the store_type_registry.xml file from the temp_dir directory to the preview_workspace_dir\wcsstore\WebContent\WEB-INF directory and rename the file to registry.xml.

    7. In the Project Explorer view of Rational Application Developer, refresh the wcsstore project.

  3. Copy over the starter store:

    1. Publish your store to the WebSphere Commerce workspace.

    2. Copy the storedir directory for your store from the workspace_dir\Stores\WebContent directory to the preview_workspace_dir\wcsstore\WebContent directory.

    3. Copy the storedir directory for your store from the workspace_dir\Stores\WebContent\WEB-INF\classes directory to the preview_workspace_dir\wcsstore\JavaSource directory.

    4. Copy the devtools directory from the workspace_dir\Stores\WebContent\WEB-INF\xml\tools\stores\ storedir directory to the preview_workspace_dir\wcsstore\WebContent\WEB-INF\xml\tools\stores directory. If the latter directory does not exist, create it.

    5. In the Project Explorer view of Rational Application Developer, refresh the wcsstore project.

  4. Verify your installation:

    1. Ensure that your store's JSP pages can be viewed in the JSP viewer:

      1. Open the preview_workspace_dir\wcsstore\WebContent\ storedir\include\JSTLEnvironmentSetup.jspf file for editing.

      2. Follow the instructions contained in the comments identified by the string " JSP preview environment".

      3. Save your changes.

    2. Create a Rational Application Developer test server and go to http://localhost:9080/wcsstore/servlet/ storedir/index.


Previous topic: Generating an XML file using the data bean to XMLGenerator
Next topic: Configure the JSP viewer

Related concepts

WebSphere Commerce JSP viewer
WebSphere Commerce workspace
Store publish process

Related tasks

Create XML files using the XMLGenerator