点击回帖跳转到的action如下
<action name="postArticleAction" class="com.bbs.showAction" method="postArticle">
<result name="success" type="chain">articleListAction</result>
</action>
如何把ID值传给articleListAction里?怎么写?请教高手解答!
<action name="articleListAction" class="com.bbs.showAction" method="articleList">
<result name="success">/bbs/article.jsp</result>
</action>
------解决方案--------------------
貌似可以在url后面加上${ID},type为"redirect"
------解决方案--------------------
点击回帖跳转到的action如下
<action name="postArticleAction" class="com.bbs.showAction" method="postArticle">
<result name="success" type="chain">articleListAction</result>
</action>
如何把ID值传给articleListAction里?怎么写?请教高手解答!
<action name="articleListAction" class="com.bbs.showAction" method="articleList">
<result name="success">/bbs/article.jsp</result>
</action>
postArticleAction可以这么写 showAction 类中 加一个属性id 提供geter seter 可以这么写
<action name="postArticleAction" class="com.bbs.showAction" method="postArticle">
<result name="success" type="chain">articleListAction.action?id=${id}</result>
</action>
------解决方案--------------------
<action name="postArticleAction" class="com.bbs.showAction" method="postArticle">
<result name="success" type="redirect">articleListAction.action?ID=${ID}</result>
</action>
articleListAction中声明一个ID变量,并提供set/get方法