Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access http request parameters in grails gsp

I am developing a web app in grails,in which on clicking of a link in email user redirected to my web page of grails. My requirement is to access http request parameters that i have passed in link in email on my gsp page.

Ex:- I have passed link http://example.com/testpage?a=something&b=12345 and when user clicks on this link he redirect to http://example.com/testpage and then i can get values of parameters from request.
Like a=something and b=12345. Thanks in advance.

like image 963
Ravi Bhandari Avatar asked Aug 08 '13 13:08

Ravi Bhandari


1 Answers

For the URL:

http://example.com/testpage?a=something&b=12345

put this in your GSP

<body>
<p>Say ${params.a}</p>
<p>count to 5, please: ${params.b}</p>
</body>

and you'll see this on your page:

Say something

count to 5, please: 12345

like image 99
Twelve24 Avatar answered Sep 18 '22 06:09

Twelve24