jsp 获取项目名称

一:获取项目名称(如:‘cdjzzjfglmh’)

(function(){
            var contextPath="<%=request.getSession().getServletContext().getContextPath()%>";
            window.$$ = function(uri) {
                return (contextPath+"/"+uri).replace(/\/{2}/, '/');
            };
            window.filePath=window.uir = contextPath+"/static/portalSite";
        })();

console.log(window.$$('personal/showEvidence'));  //cdjzzjfglmh/personal/showEvidence
console.log(window.$$(URL路径);

 

posted @ 2017-11-27 11:09  淡紫色鍀薰衣草  阅读(232)  评论(0编辑  收藏  举报