Savio Mathew
Savio Mathew

Reputation: 777

Changing Grails default index.gsp page?

I want to change grails default index page with 1 that i had designed.. In my newly created gsp file which include CSS also the CSS which is not written inside the .gsp file, its out side of it..when i tried to put my css file and index file in app view folder and when i run the app it's not displaying properly showing the error that

enter image description here

Upvotes: 0

Views: 706

Answers (1)

Igor Artamonov
Igor Artamonov

Reputation: 35961

  1. You should put your .css files into web-app/css directory
  2. Use <g:resource tag to make valid url for such resources (correct url going to be /prqapp/css/base.css, not just a /css/base.css).

So, your code should looks like:

<link type="text/css" href="${resource(dir: 'css', file: 'base.css')}" />
<link type="text/css" href="${resource(dir: 'css', file: 'layout.css')}" />
<link type="text/css" href="${resource(dir: 'css', file: 'skeleton.css')}" />

See docs for

Upvotes: 1

Related Questions