form表单的action参数值和web.xml中的<url-pattern>
来源:互联网 发布:linux 倒序查看文件 编辑:程序博客网 时间:2024/06/14 06:17
<form action="checklogin" method="post" name="form" onsubmit="return login()"><table align="center" width="455" height="133" border="1"><tr><td align="center" colspan="2"><font color=blue>欢迎进入博客登录系统<br/>请输入你的用户名和密码</font></td></tr><tr><td>用户名:</td><td><input type="text" name="uname"/><font color=blue>${requestScope.error1}</font></td></tr><tr><td>密码:</td><td><input type="password" name="upassword"/><font color=blue>${requestScope.error2}</font></td></tr><tr><td align="center" colspan="2"><input type="submit" value="登录" class="btn"><input type="reset" value="重置" class="btn"></td></tr></table></form>
<pre name="code" class="html"><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"id="WebApp_ID" version="2.5"><servlet><servlet-name>CheckLogin</servlet-name><servlet-class>com.CheckLogin</servlet-class></servlet><servlet-mapping><servlet-name>CheckLogin</servlet-name><url-pattern>/checklogin</url-pattern></servlet-mapping></web-app>
<pre name="code" class="html">以上例子中 form表单中的action属性的值是"checklogin",这个值来自web.xml中的配置信息<span style="font-family: Arial, Helvetica, sans-serif;"><url-pattern>/checklogin</url-pattern>,去掉/,然后与剩下的保持一致就可以了</span>
<span style="font-family:Arial, Helvetica, sans-serif;"></span><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; line-height: 18px; font-family: Verdana, Arial, 宋体;"><a target=_blank href="http://www.w3school.com.cn/tags/att_form_action.asp">点击打开链接</a></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; line-height: 18px; font-family: Verdana, Arial, 宋体;">action的值是一个url,表明是向何处发送表单数据。</p><p style="margin-top: 12px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; border: 0px; line-height: 18px; font-family: Verdana, Arial, 宋体;">可能的值:</p><ul class="listintable" style="margin: 20px; padding: 0px; border: 0px; list-style-type: none; font-family: Verdana, Arial, 宋体;"><li style="margin: 0px; padding: 0px; border: 0px; list-style-type: disc;">绝对 URL - 指向其他站点(比如 src="www.example.com/example.htm")</li><li style="margin: 0px; padding: 0px; border: 0px; list-style-type: disc;">相对 URL - 指向站点内的文件(比如 src="example.htm")</li></ul>
0 0
- form表单的action参数值和web.xml中的<url-pattern>
- form表单中的action参数
- form表单中的action参数
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern映射规则和URL解析
- struts2配置web的action中的<url-pattern>
- java web web.xml 中的url-pattern 和 springMVC
- 【转载】表单form action的url写法
- 表单form action的url写法
- 表单form action的url写法
- web.xml中的url-pattern标签/和/*有什么区别
- web.xml中的servlet和filter,url-pattern设置
- web.xml文件中的url-pattern是如何进行的?
- web.xml中的url-pattern的映射规则
- Java之ConcurrenHashMap
- 赋值运算符和复制构造函数的区别
- [读后感]一位39岁程序员的困惑:知道得越多编程越慢怎么办?
- 致PHP开发者的一封信
- 只会CSS还不够,LESS、SASS、BootStrap、Foundation一网打尽!
- form表单的action参数值和web.xml中的<url-pattern>
- couchbase swappiness
- Spring整合JDBC实现简单的增删改续-实现基于RowMaper的查询
- 编码规范集锦
- 23种设计模式汇总
- css常见标签
- php ci框架之创建mobel
- sysconf()、pathconf()和fpathconf()函数
- 苹果进入健康领域,将如何面对隐私问题?