Set up the JSP viewer tool
Before you can view store JSP pages in the JSP viewer, set up the JSP viewer tool.
- To install the JSP viewer tool, import the PreviewTool.ear file into a new rational Application Developer workspace as follows:
- Start Rational Application Developer and create a new workspace, preview_workspace_dir.
- In the J2EE Hierarchy view, right-click Enterprise Applications and select Import.
- Enter WCDE_installdir\samples\PreviewTools\JSPPreviewTool\PreviewTool.ear as the requested EAR file. This EAR file contains the code to allow previewing.
- Click Finish. You now have a basic installation.
- Install the samples:
- Locate the SampleXML.zip file in the WCDE_installdir\samples\PreviewTools\JSPPreviewTool directory.
- Extract the contents of this file into a temporary directory, temp_dir.
- Move the DTD files located in the preview_workspace_dir\wcsstore\imported_classes directory to the preview_workspace_dir\wcsstore\JavaSource directory.
- 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.
- 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.
- 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.
- In the Project Explorer view of Rational Application Developer, refresh the wcsstore project.
- Copy over the starter store:
- Publish your store to the WebSphere Commerce workspace.
- Copy the storedir directory for your store from the workspace_dir\Stores\WebContent directory to the preview_workspace_dir\wcsstore\WebContent directory.
- 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.
- 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.
- In the Project Explorer view of Rational Application Developer, refresh the wcsstore project.
- Verify your installation:
- Ensure that your store's JSP pages can be viewed in the JSP viewer:
- Open the preview_workspace_dir\wcsstore\WebContent\ storedir\include\JSTLEnvironmentSetup.jspf file for editing.
- Follow the instructions contained in the comments identified by the string " JSP preview environment".
- Save your changes.
- 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 viewerRelated concepts
WebSphere Commerce JSP viewer
WebSphere Commerce workspace
Store publish processRelated tasks
Create XML files using the XMLGenerator