SpringMVC in css, js, images and other static resources solutions intercepted

A storage path static resources

css, js, images and other static resources stored in the path of the project must be

Two, html, jsp import static resource files

 

html, jsp page to import static resource files:

js:

css:

image:


Two, web.xml and SpringMVC profile configuration

method one:

web.xml configuration:

SpringMVC profile configuration:

Method Two:

web.xml configuration:

SpringMVC the corresponding configuration file no special configuration

Method three:

web.xml configuration:

or

SpringMVC the corresponding configuration file no longer need to add special configuration

Method four:

 

web.xml configuration:

SpringMVC profile configuration:

Guess you like

Origin www.cnblogs.com/developer-ios/p/12024387.html