I starting out to create something using Twitter Bootstrap & Spring MVC. Can someone tell me where to place the Bootstrap CSS/JS/HTML files in a maven project structure?
My JSP page shows up fine. But, it's not able to get a hold on the CSS & JS files.
<link href="..resources/css/bootstrap.css" rel="stylesheet">
<link href="../resources/css/bootstrap-responsive.css" rel="stylesheet">
You could use Web Jars to bring them in as a Maven dependency. This gives you all the benefits of the Maven dependency management. The documentation page details how to use the resources in your app.
The "src/main/resources" folder is for resources that get copied and integrated with the compiled Java code in the resulting artifact (in this case, the WAR under "WEB-INF/classes").
The "src/main/webapp" folder represents the root of your web content. You'll need to add those web content resources there for them to be available to the JSP(s).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With