关于struts中的表单元素- Form bean not specified on mapping for action: "helloa.do"报错
2024-10-19 07:33:15
今天测试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>标记的原因,遂此记。
最新文章
- C语言 &#183; 复习杂记
- curl_init函数用法
- python 2.5源代码编绎
- js获取上一个月、下一个月
- window.location.href/replace/reload()--页面跳转+替换+刷新
- 使用 Docker 容器应该避免的 10 个事情
- 杀掉linux所有进程的命令
- js继承 prototype和constructor
- hdu_4897_Little Devil I(树链剖分)
- 查看Linux最近重启的时间
- 深入解析Javascript异步编程
- 4.Nginx的URL重写应用
- Beta Scrum
- Mysql 中的日期时间字符串查询
- 控制dom 加载成功后事件
- 一句命令修复Xcode6.2插件失效的问题
- My thoughts after NOIP 2018(2)
- Study 6 —— while循环
- C# 服务端获取客户端 系统/浏览器/IP
- linux服务器搭建