Reputation: 867
Currently working on a web application (Spring). Trying to setup bootstrap test table for the application and apply various themes to the table. However, it appears Bootstrap cannot be located. I don't know if this is a simple "I entered the wrong path" issue, or if this is a larger setup problem.
My file layout is currently as follows:
I tried the fully qualified name, just from the assets portion, swapping '/'s in and out, no luck. I reviewed the bootstrap documentation, but there isn't much if you are not using the CDN links, which I cannot.
<link rel="stylesheet" type="text/css"
href="/Grief/src/main/resources/assets/bootstrap/css/bootstrap.min.css" />
<link href="/Grief/src/main/resources/assets/font/all.min.css" rel="stylesheet">
...
<script type="text/javascript"
src="/Grief/src/main/resources/assets/bootstrap/js/bootstrap.bundle.min.js" /></script>
and
<link rel="stylesheet" type="text/css"
href="/assets/bootstrap/css/bootstrap.min.css" />
<link href="/assets/font/all.min.css" rel="stylesheet">
...
<script type="text/javascript"
src="/assets/bootstrap/js/bootstrap.bundle.min.js" /></script>
Among others, yet the table continues to look un-bootstrapped (below).
=====The full project layout=====
Chrome's console window:
Any help is greatly appreciated.
Upvotes: 0
Views: 369
Reputation: 867
These files need to be located in the static
folder. They can be referenced in the following way:
<link rel="stylesheet" type="text/css"
href="/bootstrap/css/bootstrap.min.css" />
<link href="/font/all.min.css" rel="stylesheet">
The static
file is inferred by Spring as the starting location (unless changed in the config). Include the file paths only after the static
folder.
Upvotes: 0
Reputation:
Try this path because other files are also there:
<link rel="stylesheet" type="text/css" href="resources/assets/bootstrap/css/bootstrap.min.css">
Upvotes: 1