补充点基础知识. Path mappings are used to map a URI to a contexts, handlers and servlets.
The following types of mapping are supported and applied in the order presented.
Absolute Mapping Path Spec: /path
Will match: /path path=/path info=<null>
Will not match: / /path/ /path/info /path/info.jsp /other
Prefix Mapping Path Spec: /path/*
Will match: /path path=/path info=<null> /path/ path=/path info=/ /path/info path=/path info=/info /path/info.jsp path=/path info=/info.jsp
Will not match: / /other
Suffix Mapping Path Spec: *.jsp
Will match: /path/info.jsp path=info=/path/info.jsp
Will not match: / /path /path/ /path/info /other
Default Mapping Path Spec: /
Will match: / path= info=/ /path path= info=/path /path/ path= info=/path/ /path/info path= info=/path/info /path/info.jsp path= info=/path/info.jsp /other path= info=/other
Will not match:
Typical examples Context and Servlet with path Context Path Spec : /context/* Servlet Path Spec : /servlet/*
URI ContextPath ServletPath PathInfo ========================================================= /context/servlet /context /servlet null /context/servlet/ /context /servlet / /context/servlet/x /context /servlet /x
Default Context Context Path Spec : / Servlet Path Spec : /servlet/*
URI ContextPath ServletPath PathInfo ========================================================= /servlet "" /servlet null /servlet/ "" /servlet / /servlet/x "" /servlet /x
Context and Suffix Servlet Context Path Spec : /context/* Servlet Path Spec : *.txt
URI ContextPath ServletPath PathInfo ========================================================= /context/xxx.txt /context "" /xxx.txt
Context and Default Servlet Context Path Spec : /context/* Servlet Path Spec : /
URI ContextPath ServletPath PathInfo ========================================================= /context/xxx /context "" /xxx
Default Context and Servlet Context Path Spec : / Servlet Path Spec : /
URI ContextPath ServletPath PathInfo ========================================================= /xxx "" "" /xxx
来自:http://jetty.mortbay.org/jetty/faq?s=500-Servlets&t=Path%20Mapping
分享到:
相关推荐
Need to copy file paths often? If yes, the Android app is developed for you. Try it! How to use? Download and install it. Share/Send the target file to Path Copier. OK. Notice that, the app has no ...
Called by the servlet container to indicate to a servlet that the servlet is being taken out of service. destroy() - Method in class javax.servlet.GenericServlet Called by the servlet container to ...
theory of rough paths, but rather to complement the existing literature on the subject. As a consequence, there are a number of aspects that we chose not to touch, or to do so only barely. One ...
Why are major versions v0, v1 omitted from import paths? What are some implications of tagging my project with major version v0, v1, or making breaking changes with v2+? Can a module consume a package...
Have a custom API that you aren't sure how to use with Ember Data? Interested in writing your own adapter or serializer? Want to just know more about how Ember Data works? This is the Ember Data book ...
a paper describing how to form internet paths
Expert Oracle Indexing and Access Paths helps by bringing together information on indexing and how to use it into one blissfully short volume that you can read quickly and have at your fingertips for...
(1) How many comparisons will Quicksort do on a list of n elements that all have the same value? (2) What are the maximum and minimum number of comparisons will Quicksort do on a list of n elements, ...
How Are Access Control Decisions Made? Access Control Lists Who Are You? Access Control in UNIX Who Are You in the UNIX Environment? UNIX File and Directory Permissions Are You Remembering to ...
开源项目-muesli-go-app-paths.zip,go-app-paths lets you retrieve platform-specific paths, like app-data, cache, config and logs
K-Shortest Paths 算法相关论文
Drupal汉化filefield_paths-zh-hans
Then they go on to show you how to use it, how to document your designs in Computer-Aided Design programs, and how to output your designs as specifications and tool paths that feed into the CNC ...
paths and layers Build web files Master the basics of Photoshop with the visual examples and easy-to-follow lessons in How to Use Photoshop CS 2. <br> ...
Expert Oracle Indexing and Access Paths is for all levels of database administrators and application developers who are struggling with the database performance and scalability challenge. Any database...
最短路径算法实现 k-shortest-paths
基于java的开发源码-最短路径算法实现 k-shortest-paths.zip 基于java的开发源码-最短路径算法实现 k-shortest-paths.zip 基于java的开发源码-最短路径算法实现 k-shortest-paths.zip 基于java的开发源码-最短路径...
Gimp 视频教程:paths-tool
Gimp 视频教程:paths-tool 1
access lists are built, and give examples of how to apply those access lists in different situations. Along the way, there are a number of sidebars and notes about concepts and information important...