同样的struts-config.xml, web.xml的配置,使用2个版本的form,只有struts的form才能成功运行

使用html版本的form导致post的路径不对,报404

HTML版form

    <form action="/ch16/simple.do" method="post">
姓名:<input type="text" name="name"/><br>
密码:<input type="password" name="password"/><br>
性别:<input type="radio" name="sex" value="男"/>男
<input type="radio" name="sex" value="女"/>女<br>
简介:<textarea rows="3" cols="30" name="note"></textarea><br>
<input type="hidden" name="id" value="30"/>
<input type="submit" value="提交"/>
<input type="reset" value="重置"/>
</form>

Struts版form

    <html:form action="/ch16/simple.do" method="post">
姓名:<html:text property="name"/><br>
密码:<html:password property="password"/><br>
性别:<html:radio property="sex" value="男"/>男
<html:radio property="sex" value="女"/>女<br>
简介:<html:textarea rows="3" cols="30" property="note"/><br>
<html:hidden property="id" value="30"/>
<html:submit value="提交"/>
<html:reset value="重置"/>
</html:form>

使用struts的时候form用struts的,不用html本身的的更多相关文章

  1. Struts框架——(二)Struts原理with登录实例

    二. Struts基本工作流程 假设现在有以下情景: 用户正在浏览一个用STRUTS的技术构建的网站主页,主页上有个登陆表单,用户填好登陆名和密码,单击"登陆"按钮,就激活了以下一 ...

  2. Struts1基础、使用Struts实现登录、使用Struts HTML标签简化开发

    Struts 1基础 为什么重拾Struts 1 曾经是最主流的MVC框架 市场份额依然很大 很多遗留系统中依旧使用 维护和升级都需要熟悉Struts 1 与Struts 2相比 编码.配置繁琐 侵入 ...

  3. struts漏洞处理--老项目struts版本升级遇到的问题

    struts漏洞S2-016被扫描出,要求升级struts版本,查看生产struts版本2.0.12,该漏洞影响版本2.3.15以下,上网搜索,struts2.5以上的要求jdk1.7,由于项目过老, ...

  4. struts 2学习笔记—初学struts 2

    首先我学习了struts 1.x与struts 2的区别: 1.struts 1.x的控制器类必须从Action类继承. 2.struts 2的控制器类可以是一个普通的类,也可以是ActionSupp ...

  5. Struts框架之 执行流程 struts.xml 配置详细

    1.执行流程 服务器启动: 1. 加载项目web.xml 2. 创建Struts核心过滤器对象, 执行filter  →  init()   struts-default.xml,    核心功能的初 ...

  6. struts快速入门第一篇 —— struts相关XML配置映射及讲解

    我们回忆一下在学习JavaWeb过程中(Jsp + servlet编程)所感受到的Servlet的不足: 1 Servllet很多时,web.xml中的代码会很多.这样一来,维护起来就不方便,不利于团 ...

  7. Struts2框架01【如果使用struts框架】【利用struts框架写一个 hello world】

    1 什么是Struts2框架 基于MVC设计模式的web应用框架 Struts2框架是一个轻量级的MVC流程框架 轻量级是指程序的代码不是很多,运行时占用的资源不是很多,MVC流程框架就是说它是支持分 ...

  8. Struts旅程(六)Struts页面转发控制ActionForward和ActionMapping

    转自:https://blog.csdn.net/lovesummerforever/article/details/19125933

  9. Struts的文件上传下载

    Struts的文件上传下载 1.文件上传 Struts2的文件上传也是使用fileUpload的组件,这个组默认是集合在框架里面的.且是使用拦截器:<interceptor name=" ...

随机推荐

  1. docker部署golang+redis聊天室

    博客地址:http://www.niu12.com/article/7#####1.项目源码: https://github.com/ZQCard/webchat#####2.项目构成 websock ...

  2. java中jar命令打包一个文件夹下的所有文件

    (1)首先,必须保证java的所有路径都设置好,在dos提示符下输入jar -help出现C:\Documents and Settings\dly>jar -help非法选项:h用法:jar ...

  3. screen space shadowmap unity

    unity用到了screen space shadow map 1.camera 在light pos 生成depth1 2.screen space depth2 3.根据depth1 depth2 ...

  4. Vue使用中遇到问题汇总(二)

    1.vue cli使用npm run dev报错cannot get / config/index.js里有两个环境:一个是build,一个dev. 在config/index.js里面修改,buil ...

  5. 使用maven命令搭建多模块企业级项目

    http://www.cnblogs.com/xdp-gacl/p/4242221.html

  6. DevExpress TreeList使用

    using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; us ...

  7. MySQL数据库如何与EXCEL的XLS格式相互转换

    1 将SQL导出为EXCEL方法,有如下数据库(my_impa),里面有两张表 2 如果是EXCEL格式,一定要勾选"将字段名称放在首行",否则待会儿导入的时候就需要你手工新建字段 ...

  8. JMeter 七:远程测试

    参考:http://jmeter.apache.org/usermanual/remote-test.html http://jmeter.apache.org/usermanual/jmeter_d ...

  9. FPS计算New

    using UnityEngine; using System.Collections; public class CarGUI : MonoBehaviour { private const flo ...

  10. RSA/DSA 密钥的工作原理

    下面从整体上粗略的介绍了 RSA/DSA 密钥的工作原理.让我们从一种假想的情形开始,假定我们想用 RSA 认证允许一台本地的 Linux 工作站(称作 localbox)打开 remotebox 上 ...