Question

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

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top