jsp 路径问题不在出错

代码路径:
引用
webapp
|-jsp
|-resource
  |-js
  |-css


jsp中找到js和css的方法

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


<link type="text/css" href="<%= basePath%>/resource/css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script type="text/javascript" src="<%= basePath%>/resource/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<%= basePath%>/resource/js/jquery-ui-1.8.18.custom.min.js"></script>

你可能感兴趣的:(js,UI,jsp,css,webapp)