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
- To install the JSP viewer tool, import the PreviewTool.ear file into a new rational Application Developer workspace...
- 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_INSTALL\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_INSTALL\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\src directory.
- 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.
- 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.
- 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 Enterprise Explorer view of Rational Application Developer, refresh the wcsstore project.
- Copy the starter store:
- Publish the store to the WebSphere Commerce workspace.
- Copy the storedir directory for the store from the workspace_dir\Stores\WebContent directory to the preview_workspace_dir\wcsstore\WebContent directory.
- 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.
- 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 Enterprise Explorer view of Rational Application Developer, refresh the wcsstore project.
- Verify the installation:
- Verify the 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 the changes.
- 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
Related tasks
Create XML files using the XMLGenerator