JSP页面的path代码
MyEclipse新建的jsp页面会自动生成,其他可能没有的时候,需要自己填上,放在jsp代码的最顶端。
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>标签第一行写
<base href="<%=basePath%>" />
表示页面中所有连接前面默认加上绝对路径

浙公网安备 33010602011771号