<mvc:resources mapping="" location=""/>

springmvc profile tag

<mvc:resources mapping=”” location=””/>

For example directory structure

wabapp

  statics

   img 

     apple.jpg

static resource location specified position, static resources can be placed anywhere, the wabapp directory, class path, etc., such as location = "/ statics /" shows a static resource directory on the statics

Examples  mapping = "/ aaa / **" location = "/ statics /"

mapper refers to a static resource mapping directory

For example, a request to access the address bar static resources, such as http: // localhost: 8080 / aaa / img / apple.png can access to

Jsp when accessing static resources, as

<body>

    <img src=”/aaa/img/apple.png”/>

</body>

 

You can access the

Guess you like

Origin www.cnblogs.com/yanguobin/p/11567555.html