方法一:
1 <script type="text/javascript" src="../js/data.js"></script>
方法2:
1 <% 2 String path = request.getContextPath(); 3 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 4 %> 5 <script type="text/javascript" src="<%=path%>/js/data.js"></script>