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


Modify the data bean location XML file

After you have generated all of the required files for your data beans, modify the data bean location XML file in the JSP viewer tool workspace to account for the newly created XML files.

To modify the data bean location XML file:


Procedure

  1. Go to the WCDE_preview_installdir /wcsstore/src directory.

  2. Locate the BeanLocation.xml file. If the BeanLocation.xml file doesn't exist in the workspace, then a sample version can be loaded in the SamplesXML.zip file.

  3. Modify the file to include the data bean to XML file mapping.

    The following code is an example of a tag in the BeansLocation.xml file:

    <bean id="sdb" file="AdvancedB2BDirectXML\StoreDataBean.xml" />
    The id is the ID that is used inside of a JSP page. For example, if a JSP page is instantiating a data bean using...

    <wcbase:useBean id='sdb' classname='...' />

    ...then the ID that shows up in the bean location configuration file is sdb. In this example, the sdb bean id maps to the file AdvancedB2BDirectXML\StoreDataBean.xml.

    In this case, the StoreDataBean.xml file represents...

    com.ibm.commerce.common.beans.StoreDataBean

    This file was either created using the XML to data bean generator or was manually created. For a description of the tags used to manually create this file, see the beans.dtd file in...

    RAD_installdir/Samples/PreviewTools/JSPPreviewTool/SampleXML.zip

    The StoreDataBean.xml file must exist somewhere in the class path. The most common place is in the RAD_installdir /Stores/WebContent/WEB-INF/classes directory. Since Rational Application Developer copies files from the src directory over to the RAD_installdir /Stores/WebContent/WEB-INF/classes directory, it is best to place the XML file in the src directory.


Previous topic: Configure the JSP viewer


Related concepts

WebSphere Commerce JSP viewer


Related tasks

Create XML files using the XMLGenerator


+

Search Tips   |   Advanced Search