今天测试struts时仿照书上写了一个小的表单提交代码

 <html:form action="helloa.do" method="post">
<html:submit value="提交"></html:submit>
</html:form>

报 Form bean not specified on mapping for action: "helloa.do"错。

struts-config.xml中的配置如下:

<action-mappings>
<action path="/helloa"
type="action.HelloAction"
scope="request"
input="success.jsp">
<forward name="s" path="/success.html"/>
</action>
</action-mappings>

这里没有用到ActionForm,所以没有加name属性,这个应该没有什么影响。

后来更改前台代码如下:

 <form action="helloa.do" method="post">
<html:submit value="提交"></html:submit>
</form>

页面成功跳转,可能是<html:form>标记的原因,遂此记。

最新文章

  1. C语言 &#183; 复习杂记
  2. curl_init函数用法
  3. python 2.5源代码编绎
  4. js获取上一个月、下一个月
  5. window.location.href/replace/reload()--页面跳转+替换+刷新
  6. 使用 Docker 容器应该避免的 10 个事情
  7. 杀掉linux所有进程的命令
  8. js继承 prototype和constructor
  9. hdu_4897_Little Devil I(树链剖分)
  10. 查看Linux最近重启的时间
  11. 深入解析Javascript异步编程
  12. 4.Nginx的URL重写应用
  13. Beta Scrum
  14. Mysql 中的日期时间字符串查询
  15. 控制dom 加载成功后事件
  16. 一句命令修复Xcode6.2插件失效的问题
  17. My thoughts after NOIP 2018(2)
  18. Study 6 —— while循环
  19. C# 服务端获取客户端 系统/浏览器/IP
  20. linux服务器搭建

热门文章

  1. 《转》推荐几个精致的web UI框架
  2. 线程安全的ConcurrentQueue&lt;T&gt;队列
  3. CentOS 添加 Oracle YUM 源
  4. Java如何计数字串中的一组词组?
  5. Docker孵化的5个开源项目
  6. React Native 项目整合 CodePush 全然指南
  7. mysql 分组查询的结果当成临时表 在求最大值
  8. 九度OJ 1067 n的阶乘 (模拟)
  9. docker学习网站
  10. sklearn中的数据集的划分