You need to do two things:
- Make sure the file is stored in
web-app/somefile.html, here you store the raw files for the server. Instead of using a hard-coded URL, use a method g.resource()or tag <g:resource>. In these cases, you will use it like this:
<a href="${g.resource(file:'somefile.html')}">My Link</a>
g.resource , . href="somefile.html", . URI myapp/controller/action/foo, myapp/controller/action/somefile.html.
. cached-resources - , , URL- myapp/somefile.html. - , URL.