I am using Spring 3.0.7 for my web application. I want to load an image from my location in a CSS file, for example:
.tag { background: transparent url(/resources/img/bg.gif) no-repeat; background-position: 0 50%; padding-left: 50px }
I can easily load my static resource into a jsp file, as shown below, without any problems:
<c:url value="/resources/css/main.css" />
My static resource handler was configured as shown below:
<mvc:resources mapping="/resources/**" location="/web-resources/"/>
As ealier said, I can load resources into jsp files without problems, but I cannot load an image in my CSS. Can anyone help load an image in a CSS file?
source share