导航

Servlet路径

Posted on 2014-04-04 11:36  eastson  阅读(228)  评论(0)    收藏  举报

这里仅限OSGi注册的Servlet,WebServer里面应该有所不同。

http.registerServlet("/control/main", new ControlServlet(),  null, null);

 

http://localhost/control/main
ServletPath=/control/main
ContextPath=
RequestURI=/control/main
RequestURL=http://localhost/control/main
PathInfo=null

http://localhost/control/main/
ServletPath=/control/main
ContextPath=
RequestURI=/control/main/
RequestURL=http://localhost/control/main/
PathInfo=/

http://localhost/control/main/baidu
ServletPath=/control/main
ContextPath=
RequestURI=/control/main/baidu
RequestURL=http://localhost/control/main/baidu
PathInfo=/baidu

http://localhost/control/main/baidu/
ServletPath=/control/main
ContextPath=
RequestURI=/control/main/baidu/
RequestURL=http://localhost/control/main/baidu/
PathInfo=/baidu/

http://localhost/control/main/baidu?foo=xxx&bar=yyy#zzz
ServletPath=/control/main
ContextPath=
RequestURI=/control/main/baidu
RequestURL=http://localhost/control/main/baidu
PathInfo=/baidu