I tried various tutorials but it simply dosen't work.
I am building spring application with boostrap. I want to include bootstrap.min.css in my jsp page.
Here is my project tree:
this is my spring configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<mvc:annotation-driven />
<context:component-scan base-package="com.packt.webstore" />
<mvc:resources mapping="/resources/**" location="/WEB-INF/resources/" />
<mvc:resources location="WEB-INF" mapping="/resource"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="10240000"/>
</bean>
</beans>
This line is important:
<mvc:resources mapping="/resources/**" location="/WEB-INF/resources/" />
This is my view page:
I uploaded image on purpose to show that I can't even import it because it dosen't recognize the path. Well I tried other configuration but I can't figure out how to do it the right way.