无法在struts中找到JSP的路径

时间:2009-02-24 09:04:43

标签: java struts wcs

我正在使用WCS 6.0,它使用了struts框架。 其中一个视图(CategoryDisplayView)的条目在struts config xml中被定义为以下全局转发

<forward className="com.ibm.commerce.struts.ECActionForward" name="CategoryDisplayView/10001" path="/"/>

还有为其定义的动作映射,如

中所示
<action path="/CategoryDisplayView" type="com.ibm.commerce.struts.BaseAction">
<set-property property="credentialsAccepted" value="0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P,0:P"/>
<set-property property="https" value="10151:1,11301:1,11301:1,13652:1,11351:1,11301:1,12601:1,12601:1"/>
</action>

问题是我无法找到JSP的路径。 wcs从哪里获取此视图的JSP路径?是的,它找到了正确的路径,但不知道从哪里开始

1 个答案:

答案 0 :(得分:1)

Product and Category pages in Struts do not behave as expected. 

For example, when changing: 
<forward className="com.ibm.commerce.struts.ECActionForward" name="CategoryDisplayView/10101" path="/"/> 
<forward className="com.ibm.commerce.struts.ECActionForward" name="ProductDisplayView/10101" path="/"/> 
to: 
<forward className="com.ibm.commerce.struts.ECActionForward" name="CategoryDisplayView/10101" path="SubCategoriesDisplayDef"/> 
<forward className="com.ibm.commerce.struts.ECActionForward" name="ProductDisplayView/10101" path="ProductDisplayDef"/> 
There are no resulting changes. The pages continue to render as they did before any configuration changes were made. 
Cause 
The above behaviour happens since WebSphere Commerce uses the DISPCGPREL and DISPENTREL tables to determine the jsp which will render the final view

从技术说明中得到它 的 http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/index.jsp?topic=/com.ibm.commerce.esupport.doc/html/Customization___Application_Development/swg21328797.html