Develop > Presentation layer > Work with JSP pages > WebSphere Commerce JSP viewer > Create XML files using the XMLGenerator


Set up the JSP viewer tool

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


Procedure

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

    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_INSTALL\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_INSTALL\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\src directory.

    4. Copy the store_type directory for the store from the temp_dir\classes directory to the preview_workspace_dir\wcsstore\src 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\src 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 Enterprise Explorer view of Rational Application Developer, refresh the wcsstore project.

  3. Copy the starter store:

    1. Publish the store to the WebSphere Commerce workspace.

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

    3. Copy the storedir directory for the store from the workspace_dir\Stores\WebContent\WEB-INF\classes directory to the preview_workspace_dir\wcsstore\src 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 Enterprise Explorer view of Rational Application Developer, refresh the wcsstore project.

  4. Verify the installation:

    1. Verify the 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 the changes.

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


Previous topic: Generate 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


+

Search Tips   |   Advanced Search