June 05, 2012

Grails - Getting Request,Response in Grails Service class


import org.codehaus.groovy.grails.web.util.WebUtils

…….

def webUtils = WebUtils.retrieveGrailsWebRequest()

//Getting the Request object

webUtils.getCurrentRequest()

//Getting the Response object

webUtils.getCurrentResponse()

//Getting the ServletContext object

webUtils.getServletContext()

1 comment:

  1. Thanks for the post, I am techno savvy. I believe you hit the nail right on the head. I am highly impressed with your blog.
    It is very nicely explained. Your article adds best knowledge to our Java Online Training from India.
    or learn thru Java Online Training from India Students.

    ReplyDelete