Spring Web Jars

springmvc

// SpringMVC - WEB JARS:

Add the bootstrap and jQuery web jars as dependency, then add the CSS files in 
the head section of the JSP file:

<link href="webjars/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

And add the JavaScript files just before the closing body tag:

<script src="webjars/jquery/1.9.1/jquery.min.js"></script>
<script src="webjars/bootstrap/3.3.6/js/bootstrap.min.js"></script>

Notices that the URLs starts with webjars. And we need to add:

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

to the "application context" configuration file.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License