Modifying 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:
- Go to the WCDE_preview_installdir /wcsstore/JavaSource directory.
- 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.
- 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 the 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 JavaSource directory over to the RAD_installdir /Stores/WebContent/WEB-INF/classes directory, it is best to place the XML file in the JavaSource directory.
Previous topic: Configure the JSP viewerRelated concepts
WebSphere Commerce JSP viewerRelated tasks
Create XML files using the XMLGenerator