web.xml文件中的url-pattern是如何进行的?
来源:互联网 发布:初学瑜伽哪个软件好 编辑:程序博客网 时间:2024/05/17 06:03
在上一片blog中最后留下了这么一个问题。下面开始来解决。参考:
http://www2.roguewave.com/support/docs/leif/leif/html/bobcatug/7-3.html
http://foxty.javaeye.com/blog/39332
http://blog.chinaunix.net/u2/86974/showart_1776019.html
10.2 Specification of Mappings
In the web application deployment descriptor, the following syntax is used to define mappings:
• A string beginning with a '/' character and ending with a '/*' postfix is used as a path
mapping.
• A string beginning with a '*.' prefix is used as an extension mapping.
• All other strings are used as exact matches only
• A string containing only the '/' character indicates that servlet specified by the mapping becomes the "default" servlet of the application.
For example, a web.xml file for the examples context on the server at example.com matches the pattern in <url-pattern>/status/*</url-pattern> as follows:
http://example.com/examples/status/synopsis
Matches
http://example.com/examples/status/complete?date=today
Matches
http://example.com/examples/status
Matches
http://example.com/examples/server/status
Does not match
A context located at the path /examples on the server at example.com matches the pattern in <url-pattern>*.map</url-pattern>
as follows:
http://example.com/examples/US/Oregon/Portland.map
Matches
http://example.com/examples/US/Washington/Seattle.map
Matches
http://example.com/examples/Paris.France.map
Matches
http://example.com/examples/US/Oregon/Portland.MAP
Does not match, the extension is uppercase
http://example.com/examples/interface/description/mail.mapi
Does not match, the extension is mapi rather than map
- web.xml文件中的url-pattern是如何进行的?
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- web.xml中的url-pattern
- java web.xml文件中的url-pattern 中的/ 与/*的区别
- web.xml中的url-pattern的映射规则
- web.xml中的url-pattern的映射规则
- web.xml中的Servlet的url-pattern映射规则
- web.xml中的url-pattern映射规则
- web.xml中的url-pattern映射规则
- Web.xml中的url-pattern详解
- web.xml中的url-pattern映射规则
- web.xml中的url-pattern照射规则
- web.xml中的url-pattern映射规则
- web.xml中的url-pattern映射规则
- web.xml中的url-pattern映射规则
- A Template for C-Language Library Creation - 一个创建C语言运行库的模板
- SQLServer数据库的备份与还原
- VC利用boost库解析正则表达式
- C++强制类型转换
- Qt生成灰度图
- web.xml文件中的url-pattern是如何进行的?
- 无师真能自通吗?--JAVA学习方法篇
- css中padding、margin两个重要属性的详细介绍及举例说明
- MFC控件
- orcle dblink 的使用
- uva10783 Odd Sum
- 创建聚集索引(clustered)和非聚集索引(nonclustered)
- flash socket与后台通讯遇到的问题
- Flex示例:实现画线