理解相对路径和绝对路径
相对路径:
绝对路径:
如果资源无法加载 有三种方法解决
<%----%>
解决 请求不加/的问题
第一种:加上tomcat URL
<base href="http://localhost:8080/01_springmvc_hello_war_exploded/">
第二种: EL表达式
<a href="${pageContext.request.contextPath}/user/some.do"></a>
第三种:bash标签
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href=”<%=basePath%>”>