Note that there are some explanatory texts on larger screens.

plurals
  1. POResource not found Error and what about resources plugin
    primarykey
    data
    text
    <p>I am using grails for almost a year. Since now when I wanna link a css or js file in a gsp. I did the following:</p> <ol> <li><p>I created a new file (eg the resources file) under web-app folder and I put there all my files of folders (eg when importing bootstrap I had a parent folder bootstrap under resources and under bootstrap there were css, img and js folders with their files).</p></li> <li><p>Then, to import a css file I did the following (<a href="http://grails.org/doc/latest/ref/Tags/resource.html" rel="nofollow">here is documentation for this</a>):</p></li> </ol> <blockquote> <p>&#60;link rel="stylesheet" href="${resource(dir: 'resources/bootstrap/css', file: 'bootstrap.min.css')}" type="text/css"&#62;</p> <p>&#60;script src="${resource(dir: 'resources/bootstrap/js', file: 'bootstrap.min.js')}">&#60;/script&#62;</p> </blockquote> <p>This worked great, but when I tried to create a new Project in grails 2.2.4 I had a Resource not found Error (404 to browser and the following to console).</p> <pre><code>ERROR resource.ResourceMeta - Resource not found: /resources/bootstrap/css/bootstrap.min.css ERROR resource.ResourceMeta - Resource not found: /resources/bootstrap/js/bootstrap.min.js ERROR resource.ResourceMeta - Resource not found: /resources/bootstrap/css/bootstrap.min.css ERROR resource.ResourceMeta - Resource not found: /resources/bootstrap/js/bootstrap.min.js </code></pre> <p>As I realized these Errors in console were once from the resources function and once from the GET that client(browser) requested.</p> <p>When looking at <a href="http://grails.org/plugin/resources" rel="nofollow">resources plugin</a> I see that they suggest using the js and css folders. Is that meaningful to split a tool (eg twitter bootstrap) in these two directories?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload