`

成功页面返回到固定某页面

阅读更多
(1)再struts-config.xml文件中配置好转向文件
  <action path="/Tab_xn_music/add" parameter="ADD" type="com.srt.vas.dummymain.backgroud.controller.Tab_xn_musicAction"
      scope="request" name="tab_xn_musicForm" validate="false">
      <forward name="success" path="/manager/Tab_xn_music/entry.jsp"/>
    </action>
     <action path="/Tab_xn_music/save" parameter="SAVE" type="com.srt.vas.dummymain.backgroud.controller.Tab_xn_musicAction"
      scope="request" name="uploadWelcomeForm" validate="true" input="manager.Tab_xn_music.entry">   
<forward name="success" path="do/Tab_xn_music/add"/>
</action>
红色部分表示:当save成功后转向add页面
(2)相应的form页面提交jsp文件
<html:form action="/Tab_xn_music/save"  target="_parent"  method="post"  enctype="multipart/form-data"  onsubmit="return validateForm(this);">
应该把红色部分给去掉,采用默认的_self
注:
_blank 开一个新窗口
_parent 显示在上一层窗口中
_top 显示在最上层窗口
name 显示在名字叫name的窗口中
_self 显示在当前窗口
缺省的属性,点一下,当前页面就换成href指向的页面
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics