public GrailsWebRequest(
     HttpServletRequest request,
     HttpServletResponse response,
     GrailsApplicationAttributes attributes) {
   super(request, response);
   this.attributes = attributes;
   this.applicationContext = attributes.getApplicationContext();
   inheritEncodingStateRegistry();
 }
 public GrailsWebRequest(
     HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) {
   super(request, response);
   try {
     attributes = grailsApplicationAttributesConstructor.newInstance(servletContext);
     this.applicationContext = attributes.getApplicationContext();
   } catch (Exception e) {
     ReflectionUtils.rethrowRuntimeException(e);
   }
   inheritEncodingStateRegistry();
 }
 /** @return the out */
 public Writer getOut() {
   Writer out = attributes.getOut(getCurrentRequest());
   if (out == null) {
     try {
       return getCurrentResponse().getWriter();
     } catch (IOException e) {
       throw new ControllerExecutionException(
           "Error retrieving response writer: " + e.getMessage(), e);
     }
   }
   return out;
 }
 public void setFilteringCodec(String codecName) {
   filteringEncoder =
       codecName != null
           ? CodecLookupHelper.lookupEncoder(attributes.getGrailsApplication(), codecName)
           : null;
 }
 /** @return The FlashScope instance for the current request */
 public FlashScope getFlashScope() {
   return attributes.getFlashScope(getRequest());
 }
 /** @return The ServletContext instance */
 public ServletContext getServletContext() {
   return attributes.getServletContext();
 }
 /** @param out the out to set */
 public void setOut(Writer out) {
   attributes.setOut(getCurrentRequest(), out);
 }