Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieving HTTP parameters in Grails

 
Ajit Sethi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Ajit Sethi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My answer remains the same then. Pull the request parameters out of the params variable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic