Struts2重定向后页面不跳转,求大神解决!

茂盛的小绿芽 茂盛的小绿芽 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
struts.xml action的配置
<action name="NewsAction_*" class="newsAction" method="{1}">
<result name="toNewsListPage">/back/news.jsp</result>
<result name="toAddNewsPage">/back/news_add.jsp</result>
<result name="toNewsListAction" type="redirectAction">NewsAction_findAll</result>
</action>


Action代码!是从下边的action中返回toNewsListAction ,转到NewsAction_findAll action中
/**
* 查询所有新闻方法
* @return
*/
public String addNewsEntity(){
newsService.addNewsEntity(model);
return "toNewsListAction";
}


从定向的action
	/**
* 查询所有新闻方法
* @return
*/
public String findAll(){
this.newsEntityList = newsService.findAllEntity();
System.out.println("findall");
return "toNewsListPage";
}

现在已经进入到重定向的action中了!但是不知为什么页面就是不跳转。
...全文
评论 3
收藏 已收藏
分享
返回顶部
茂盛的小绿芽
Java EE 67,535 成员 225,843 内容