I'm facing following problem actually:
I'm using Spring with jQuery. I have Controller:
@Controller
@RequestMapping(value = "/A")
public class AController {
// not important
}
That is handling all host/A/...
URLs fine. But jQuery CSS styles are using url(images/...)
, so there are references from host/A/index.jsp
to host/A/images/...
. But I have no such folder since /A/ is just "logical" URL.
I tried to add
<mvc:resources mapping="/images/**" location="/images/" />
<mvc:resources mapping="/A/images/**" location="/images/" />
to my web.xml, but it seems it is not working (first one is working fine). For example when I try to test this, host/A/test.png
is not working.
Of course I can modify jQuery sources, but I do not preffer this way.
Maybe I can use UrlRewriteFilter if there is not simpler solution.