struts2 在jsp的from表单交付失效,不进入action
struts2 在jsp的from表单提交失效,不进入action
from头如下
<form action="/MyApply/startFlow.action" method="post">
我一点提交 浏览器不进入struts2的action 而是在浏览器地址栏显示一行这个
http://localhost:8080/MyApply/itheima/customer/process/startFlow.jsp?courseId=1&username=%E6%9B%B9%E5%AE%87
http://localhost:8080/MyApply/itheima/customer/process/startFlow.jsp是我这个from所在JSP的路径
后面是我提交的两个属性 courseid username 可是怎么一点击提交 不进入action 反而感觉跟GET提交了
直接跑到了浏览器上面了呢? 求大神
代码如下
struts.xml文件内容如下
from头如下
<form action="/MyApply/startFlow.action" method="post">
我一点提交 浏览器不进入struts2的action 而是在浏览器地址栏显示一行这个
http://localhost:8080/MyApply/itheima/customer/process/startFlow.jsp?courseId=1&username=%E6%9B%B9%E5%AE%87
http://localhost:8080/MyApply/itheima/customer/process/startFlow.jsp是我这个from所在JSP的路径
后面是我提交的两个属性 courseid username 可是怎么一点击提交 不进入action 反而感觉跟GET提交了
直接跑到了浏览器上面了呢? 求大神
代码如下
<form action="/MyApply/startFlow.action" method="post">
<table>
<tr>
<td width="130px" align="right" height="45px">请选择您的意向课程:</td>
<td>
<input type="radio" name="courseId" value="1" onBlur="checkCourse()">高数
<input type="radio" name="courseId" value="3" onBlur="checkCourse()">数据结构
<input type="radio" name="courseId" value="4" onBlur="checkCourse()">运筹学
<input type="hidden" name="username" value="${sessionScope.user.username}" />
<span id="s1" style="color: red;padding-left: 10px;"></span>
</td>
</tr>
<tr>
<td colspan="2" height="80px;">
<div style="background:url('../../images/customer/pic_button01.gif') no-repeat left top;width:110px; height:42px; padding-left:10px;">
<input type="submit" value="提交" style="outline:0 none; border:0 none; background:url('../../images/customer/pic_button01.gif') no-repeat right top;width:120px; height:42px;font-size:20px;color:#FFF;font-weight: bold;cursor:hand" />
</div>
</td>
</tr>
</table>
</form>
struts.xml文件内容如下
<package name="jbpm" namespace="/" extends="struts-default">
<action name="startFlow" class="com.my.apply.action.FlowAction" method="startFlow">
<result>/my/customer/process/applyIndex.jsp</result>
<result name="repeat">/repeat.jsp</result>
</action>
- 1JS如何实现页面按空格键的时候自动替换成‘’
- 2表单提交的时分保存和返回只要两个图片就好了吗 不要具体的方法
- 3You have an error in your SQL syntax 找了一晚上不知道错哪了
- 4hibernate多对多HQL查询的不解 各位大牛来指点一下吧
- 5action里面对数据库一系列操作 如何保证原子性呢
- 6为啥有的方法里面throw new 自定义错误类("") 外的方法外面有throws 有的没有
- 7hibernate更动字段not null属性不生效
- 8jquery如何样按顺序获取SRC的属性和文本框的值
- 9大家伙儿hibernate 的项目里用一级缓存和二级缓存吗
- 10PreparedStatement的批量插入式无序的?该如何处理
文章评论
相关解决方案
- 1Struts2表单交付后没有进入action的痕迹
- 2struts2 action中的数组怎的在jsp页面添加
- 3关于基于struts2 在jsp/action class间传值有关问题
- 4struts2交付表单直接进入result input
- 5struts2 从action中读的内容在jsp中展示不出来
- 6struts2中,在jsp页面经过ajax访问action,进不去。求大神看看!
- 7extjs中submit交付后不进入success也不进入failure
- 8很急struts2里action传送一个对象过去,在jsp中如何输出该对象的属性
- 9struts2开发中在jsp页面顶用js取得action中传过来的值
- 10struts2在jsp页面提交中文的时候到action中的中文乱码有关问题