After reading many people's blogs, the recommended method is
<mvc:default-servlet-handler/>
<mvc:annotation-driven ></mvc:annotation-driven>
But it is useless to me, css, jquery, jpg are not displayed,
and then add
<mvc:resources location="/WEB-INF/pages/css/" mapping="/css/**"/>
<mvc:resources location="/WEB-INF/pages/jquery/" mapping="/jquery/**"/>
<mvc:resources location="/WEB-INF/pages/img/" mapping="/img/**"/>
This time it finally worked, but there is still no picture.
No matter how <mvc: resources location = "/ WEB-INF / pages / img /" mapping = "/ img / **" /> is changed, the picture cannot be displayed, in web.xml Adding some code will not work, and accidentally put the picture resource and the css file together and it works. ? ?
I still don't know why, can anybody explain it?
<img alt="" src="css/wall.jpg" >