This is how my project's structure looks like:
webapp:
resources:
css:
test.css WEB-INF:
pages:
mvc-dispatcher-servlet.xml
web.xml
I am working on including a .css file in my jsp.
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 />
To include the css in my jsp, I have added this code:
<link href="<c:url value='/resources/css/test.css' />" rel="stylesheet">
However, it seems to not be working as expected. Any assistance would be greatly appreciated.