Create View


  1. In WCD IDE go to Stores\WebContent\Madisons and create a new folder Test
  2. Right click on the folder Test and click Files. In the wizard name your jsp TestView.jsp
  3. In  TestView.jsp add below code:
  4. My test view
    
  5. Adding Struts entry
    • under Actions Mappings click Add and rename default value to /testView. Also enter  com.ibm.commerce.struts.BaseAction in the Type text box and save.
    • Go to Global Forwards tab 
      • click Add button. and change default value to testView/10051 (where 10051 is the STOREENT_ID of Madisons store. You can fins this by running the query select STOREENT_ID from STOREENT where IDENTIFIER = 'Madisons'; )
      • Under Forward Attributes section add the path as /Test/TestView.jsp
  6. Create and run access policies (xml for view is given below)
  7. 
    
    
    
    
    
    
    
                 
    
    
    
    
    
  8. Start server
  9. Test you view using URL:  http://localhost/webapp/wcs/stores/servlet/testView?storeid=10051

Reff:  http://publib.boulder.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.tutorial.doc/tutorial/ttd12.htm

No comments:

Post a Comment