html中获取工程路径:
<% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>
var localObj = window.location; var contextPath = localObj.pathname.split("/")[1]; var basePath = localObj.protocol+"//"+localObj.host+"/"+contextPath;
String path = ServletActionContext.getRequest().getRealPath(relativePath);
Tomcat源码阅读之StandardEngine分析与Valve的设计,布布扣,bubuko.com
Tomcat源码阅读之StandardEngine分析与Valve的设计
原文:http://blog.csdn.net/fjslovejhl/article/details/20923317