JettyPlusIT.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:uavstack 作者:
/**
 * getBasePath
 * 
 * @param context
 * @param sContext
 */
private void getBasePath(InterceptContext context, ServletContext sContext) {

    String basePath = sContext.getRealPath("");

    if (basePath == null) {
        return;
    }

    if (basePath.lastIndexOf("/") == (basePath.length() - 1)
            || basePath.lastIndexOf("\\") == (basePath.length() - 1)) {
        basePath = basePath.substring(0, basePath.length() - 1);
    }

    context.put(InterceptConstants.BASEPATH, basePath);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号