扫码关注官方订阅号
闭关修行中......
打印下path 就知道了
可以看下源码方法的说明文档。request.getContextPath()获取的是项目的上下文路径,是一个相对路径。是"/"开头的
Returns the portion of the request URI that indicates the context
of the request. The context path always comes first in a request
URI. The path starts with a "/" character but does not end with a "/"
character. For servlets in the default (root) context, this method
returns "". The container does not decode this string.
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
打印下path 就知道了
可以看下源码方法的说明文档。request.getContextPath()获取的是项目的上下文路径,是一个相对路径。是"/"开头的
Returns the portion of the request URI that indicates the context
of the request. The context path always comes first in a request
URI. The path starts with a "/" character but does not end with a "/"
character. For servlets in the default (root) context, this method
returns "". The container does not decode this string.