Servlet , Servlet Mapping and Pattern the HTML
来源:互联网 发布:海康安防 js 编辑:程序博客网 时间:2024/06/01 17:56
In the web.xml config file:
<servlet>
<servlet-name>Your Sevlet name</servlet-name>
<servlet-class>Your class </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Your Sevlet name</servlet-name>
<url-pattern>/url</url-pattern>
</servlet-mapping>
In the HTML file:
<form method="post" action="url">
</form>
Note:
1: The servlet-name in the two tags must be the same !
2: The url must be started with the '/', it stands for the webApp root directory .
3: The url in the HTML file must be the same with in the web.xml, except the char '/'
For example:
If your web.xml file was :
<servlet-mapping>
<servlet-name>Your Sevlet name</servlet-name>
<url-pattern>/YangZhiYong1/YangZhiYong2/servlet</url-pattern> //The diretories is not limited.
</servlet-mapping>
so your HTML file must write as :<form method="post" action="YangZhiYong1/YangZhiYong2/servlet">
</form>
- Servlet , Servlet Mapping and Pattern the HTML
- Difference between / and /* in servlet mapping url pattern
- servlet mapping 中URL pattern
- wildcard in servlet/filter url-pattern mapping
- Invalid <url-pattern> in servlet mapping
- servlet-mapping之url-pattern详解
- servlet-mapping之url-pattern详解
- servlet-mapping url-pattern映射路径研究
- Invalid <url-pattern> [xxx] in servlet mapping
- Servlet mapping
- servlet-mapping
- servlet-mapping
- servlet-mapping
- servlet和servlet-mapping
- 关于servlet-mapping里的url-pattern说明
- web.xml中servlet-mapping的url-pattern的配置
- web.xml中servlet-mapping的url-pattern的配置
- javaee mapping request to servlets/servlet url-pattern 配置问题
- 最长单调递增子序列
- uboot启动流程分析图
- LVS的工作原理和相关算法
- 每天学一点flash(82) jsfl 的swf窗口面板
- 看到一篇耶鲁大学培养人的文章,有感,转发
- Servlet , Servlet Mapping and Pattern the HTML
- 在VC++6.0中复制对话框
- Lazy.Lib系列 - 摄像头图像采集、录像
- C#数据结构和算法学习系列五----基础查找算法
- hdu 4023
- HDU 4033
- 如何调用远程web service
- 东南融通,你咋整的?
- HDU 4038 无题