File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes Retrieving HTTP parameters in Grails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Retrieving HTTP parameters in Grails" Watch "Retrieving HTTP parameters in Grails" New topic
Author

Retrieving HTTP parameters in Grails

Ajit Sethi
Greenhorn

Joined: Sep 17, 2012
Posts: 5
the request was sent from an HTML form, the request body contains the form data,how can i retrieve that data in my Grails application.Below is the URL from where i need to retrieve data.I'm a Rookie in Grails so please help me with this.

http//localhost:8080/copypolicyNumber/loginaction.jsp?fname=Roger&lname=wallace&city=Des+Moines&pnum=123456&submit=Submit
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Your question is slightly confusing because you have a URL with a JSP but Grails doesn't use JSPs. Can you possibly add some more details to your question? Generally, when a request comes into a Grails controller, you access the request parameters with the params variable.



GenRocket - Experts at Building Test Data
Ajit Sethi
Greenhorn

Joined: Sep 17, 2012
Posts: 5
i have an old login form and want to redirect this to my grails app, actually i need to make a POC(proof of concept). i can try making the old login page with HTML, actually they want to see if a user request from old page then the data can be retrieved in the new Grails login page
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

My answer remains the same then. Pull the request parameters out of the params variable.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Retrieving HTTP parameters in Grails