jsp路径问题

来源:互联网 发布:mac压缩包加密 编辑:程序博客网 时间:2024/06/04 22:46

<%

String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>



<link href="<%=basePath %>css/index_1.css" rel="stylesheet" type="text/css" />

<%=basePath %>根路经webroot