在html中用js代替${pagecontext.request.getcontextpath}这样就不用使用jsp了
var pathArray = window.location.pathname.split('/');
var secondLevelLocation = pathArray[1];
var loginUrl = window.location.protocol + "//" + window.location.host + "/"+ secondLevelLocation;