【发布时间】:2016-04-19 16:51:53
【问题描述】:
我的项目结构是:
webapp:
resources:
css:
test.css WEB-INF:
pages:
mvc-dispatcher-servlet.xml
web.xml
我正在尝试在我的 jsp 中包含一个 .css 文件。
mvc-dispatcher-servlet.xml:
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<mvc:resources mapping="/resources/**" location="resources/css/"> </mvc:resources>
<mvc:annotation-driven />
在jsp中包含css:
<link href="<c:url value="/resources/css/test.css" />" rel="stylesheet">
但这对我不起作用。我需要帮助,请
【问题讨论】: