使用base

使用base 的好处,就是你的项目在跟目录开始寻找路径~

为解决开发效率使用!

 

 

base.jsp

 

<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<% 
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
<link type="text/css" rel="stylesheet" href="boss/skins/css/main.css"/>
<script type="text/javascript" src="boss/inc/main82.js"></script>
<script type='text/javascript' src='boss/inc/jQuery/jquery1_4_2.js'></script>
<script type="text/javascript" src="boss/inc/admin.js"></script>
<script type="text/javascript" src="boss/inc/main.js"></script>
 

你可能感兴趣的:(JavaScript,html,jquery,jsp,css)