我使用Struts2的。Struts 2的操作重定向
localhost:8084/Web/viewProductsAction?idProducts=1
後,我看到這個產品,我發表評論
而且它的成功,但我得到搬到localhost:8084/Web/listProductsAction
這裏是struts.xml
<action name="listProductsAction" class="com.struts2.action.ProductsAction" method="viewProducts">
<result name="success">/products.jsp</result>
</action>
<action name="sendComments" class="com.struts2.action.CommentsAction" method="sendComments">
<result name="success" type="redirect">listProductsAction</result>
</action>
代碼,但我想以後發表評論,轉發給localhost:8084/Web/viewProductsAction?idProducts=1
我該怎麼做?
什麼是上述網址的動作配置? – 2014-12-19 12:15:48
U是指web.xml文件? – king37sniper 2014-12-19 12:31:20
您已經發布了唯一的操作配置以XML爲兩個動作'listProductsAction'和'sendComments'。什麼是'localhost上的操作配置:?8084 /網絡/ viewProductsAction idProducts = 1'? – 2014-12-19 12:35:59