springmvc resources 配置


http://www.mkyong.com/spring-mvc/spring-mvc-how-to-include-js-or-css-files-in-a-jsp-page/

如果
<mvc:resources mapping="/resources/**" location="/resources/mytheme/" />注意location是Webroot目录下面的文件夹

<link href="${pageContext.request.contextPath}/resources/css/main.css" rel="stylesheet" >
需要在映射目录前面加上工程名称

posted @ 2014-08-16 20:39  孤魂野鬼hg  阅读(220)  评论(0)    收藏  举报