我的程序用的是struts+spring+hibernate的框架,然后初始的页面是vote.htm:
主体是:<iframe src="http://localhost:8080/votesystem/beforeShowChoose.action" width="340" frameborder="0" height="140" />我的struts.xml:
...
<action name="beforeShowChoose" class="beforeShowChoose">
<result type="chain">showChooseVoting</result>
</action>
<action name="showChooseVoting" class="showChooseVoting">
<result name="voteclose">/jsp/vote/voteclose.jsp</result>
<result>/jsp/vote/showchoosevoting.jsp</result>
</action>
<action name="showVoting" class="showVoting">
<result name="voteclose">/jsp/vote/voteclose.jsp</result>
<result type="chain">showVotingContext</result>
</action>
<action name="showVotingContext" class="showVotingContext">
<result>/jsp/vote/showvoting.jsp</result>
</action>
...我的showchoosevoting.jsp:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib prefix="s" uri="/struts-tags"%><html>
<style type="text/css">
<!--
body {
background-color: #869de3;
}-->
a {
font-size: 12pt;
text-decoration: none
}
</style>
<body>
<center>
选择投票主题
<s:form action="showVoting">
<s:radio list="#request.map" name="choose"  />
<br>
<s:submit value="下一步" />
</s:form>
</center>
</body>
</html>
为什么我进入vote.htm是它会跳过showchoosevoting.jsp的显示直接导入到showVoting这个action呢?大牛帮帮忙啊,我都急死了先谢谢了~~

解决方案 »

  1.   

    <iframe src="http://localhost:8080/votesystem/beforeShowChoose.action" width="340" frameborder="0" height="140" />
    进入 beforeShowChoose.action<action name="beforeShowChoose" class="beforeShowChoose">
    <result type="chain">showChooseVoting</result>
    </action>进入showChooseVoting
    跳到 showchoosevoting.jsp<s:form action="showVoting">
    <s:radio list="#request.map" name="choose" />
    <br>
    <s:submit value="下一步" />
    </s:form>
    点击下一步
    然后进入  showVoting.action
    思路是这样的没错,我分析一下, 你先在 <s:form action="showVoting"> 里面 加 个 method
    其它程序我看不出什么问题,你检查是不是  另外的spring 配置里面写错了。或者是后天程序写错了。跳转错误。希望对你有帮助
      

  2.   

    action 代码完成后 跳转 是不是不对?
      

  3.   

    你的action里是怎么写的?发出来看看
    <result name="voteclose">/jsp/vote/voteclose.jsp</result>
    <result>/jsp/vote/showchoosevoting.jsp</result>
    可能因为struts里面以上配置导致的吧