我的程序用的是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呢?大牛帮帮忙啊,我都急死了先谢谢了~~
主体是:<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呢?大牛帮帮忙啊,我都急死了先谢谢了~~
解决方案 »
- java ssh utf-8链接数据库汉字正常显示但是源代码不正常
- jquery.post里的回调函数怎么将后台的数据回调到前台呢
- 如何对BufferedReader.readLine做超时
- 怎么学习项目流程?
- 手动配置struts2总提示找不到filter类
- 工作流、权限系统、报表系统哪个更重要
- 一个EJB的小问题,大哥大姐帮帮看一下,我是小菜鸟一个..
- spring 问题 求大神给予答案
- 请教:Strutc结构的WEB代码如何在WEBLOGIC7.01下部署
- Hibernate映射外键
- 看看我的spring配置是不是有问题,事务不起作用,在线等
- tomcat6.0安装版已经配置完成,输入http://localhost:80/my/index.html出现HTTP status 404错误,怎么解决?
进入 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 配置里面写错了。或者是后天程序写错了。跳转错误。希望对你有帮助
<result name="voteclose">/jsp/vote/voteclose.jsp</result>
<result>/jsp/vote/showchoosevoting.jsp</result>
可能因为struts里面以上配置导致的吧