题
我正在开发 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 路径?是的,它正在寻找正确的路径,但不知道从哪里开始
解决方案
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
不隶属于 StackOverflow