无法在spring项目中加载css / js文件

时间:2016-05-03 06:04:29

标签: spring jsp spring-mvc external-js

我已经尝试了两种方法在我的春季项目中加载external css or js files,但它们都没有正常工作。

回到Home.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css"
href="/resources/css/font-awesome.min.css" />//NOT LOADING
 <link rel="stylesheet" href="<c:url value="resources/css/style.css"/>" />//Not loading Method tried 1
 <link rel="stylesheet"
href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="/resources/css/style.css">//Not loading Method tried 2
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js">      </script>

0 个答案:

没有答案