Jack Daniel
Jack Daniel

Reputation: 2467

GET-style urls in Grails

is there any way to create old-style GET urls in Grails. e.x. if I click a link or button, a want to open a page with url like www.example.com/name=somename?surname=somesurname.

P.S. sorry for my english

Upvotes: 0

Views: 43

Answers (1)

Joshua Moore
Joshua Moore

Reputation: 24776

To create URL/Links with query parameters, or GET style URLs as you call them, use the following:

<g:link controller="whatever" action="something" params="[name: 'somename', surname: 'somesurname']">My link</g:link>

and

<g:form name="MyFormName" controller="whatever" action="something" method="GET">
...
</g:form>

Upvotes: 1

Related Questions