SAGAR MANE
SAGAR MANE

Reputation: 685

How to set Link in mail Using Grails 2.2.0

i am trying to set a link via grails tag.. but its just show me controller and action name

<g:link controller="email" action="sendpart" id="${mailObj?.to_id}">View inbox </g:link>

in URL it Just shows me

http://Demo/email/sendpart/2

Rather than

http://localhost:8080/Demo/email/sendpart/2

Thank You!

Upvotes: 1

Views: 851

Answers (2)

MKB
MKB

Reputation: 7619

Add base url in the g:link like

<g:link controller="first" action="test" base="http://localhost:8080/myApp">Click</g:link>

Upvotes: 1

ABC
ABC

Reputation: 4373

Add absolute="true"

<g:link controller="email" action="sendpart" id="${mailObj?.to_id}" absolute="true">View inbox </g:link>

Enjoy.

Upvotes: 2

Related Questions