Wednesday, 11 September 2013

Resource not found Error and what about resources plugin

Resource not found Error and what about resources plugin

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:
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).
Then, to import a css file I did the following (here is documentation for
this):
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).
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
As I realized these Errors in console were once from the resources
function and once from the GET that client(browser) requested.
When looking at resources plugin 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?

No comments:

Post a Comment