0

I want to link to another gsp file.

I tried:

<li>
 <a href="/private/dashboard">Dashboard</a>
</li>

However, this results in http://localhost:8080/private/dashboard which is basically not where I want to go.

Any recommendations what I could change to link to my dashboard.gsp?

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264

2 Answers2

1

You have to add a mapping to UrlMappings.groovy to make your link point to a GSP view:

"/private/dashboard" (view:"/private/dashboard")
lukelazarovic
  • 1,510
  • 11
  • 19
-1

you can use the <g:link>-Tag to create a Link to a controller action.

See http://grails.org/doc/latest/ref/Tags/link.html

knarfancho
  • 54
  • 3