我这边jsp引入js和css路径一直写错,这是我的目录结构,
这四个一个都没引用上
 <head>
    <base href="<%=basePath%>">
    
    <title>检索</title>
    
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" href="../css/bootstrap.css">
<script src="${pageContext.request.contextPath}/js/jquery-3.2.1.js"></script>
<script src="./js/checkshow.js" charset=''></script> 
   <script src="../js/bootstrap.js"></script>

解决方案 »

  1.   

    放webapp下面。。
      

  2.   

    解决了  在新建一个static 文件夹  把css js放在里面就好
    <link rel="stylesheet" href="css/bootstrap.css">
    <script src="js/jquery-3.2.1.js"></script>
    <!-- <script src="js/jquery-2.1.1.min.js"></script> -->
    <script src="js/checkshow.js" charset=''></script> 
       <script src="js/bootstrap.js"></script>
      

  3.   

    不能放在WEB-INF中.
      

  4.   

    放在WEB-APP或者新建一个static文件加 都可以  我们是新建的static文件夹
      

  5.   


    放在WEB-INF下面访问不到
      

  6.   

    一般情况下,公用的脚本,样式库,图片,都放在webapp的同级目录