Groovy Documentation

## org.codehaus.groovy.grails.web.sitemesh
[Java] Class GrailsPageResponseWrapper

    java.lang.Object
      javax.servlet.http.HttpServletResponseWrapper
          org.codehaus.groovy.grails.web.sitemesh.GrailsPageResponseWrapper

    public class GrailsPageResponseWrapper
    extends HttpServletResponseWrapper

Authors:
  Graeme Rocher

Since:
  1.0.4

Constructor Summary
`GrailsPageResponseWrapper(HttpServletRequest request, HttpServletResponse response, PageParserSelector parserSelector)`

Method Summary
`void` | `activateSiteMesh(java.lang.String contentType, java.lang.String encoding)`
`void` | `addHeader(java.lang.String name, java.lang.String value)` Prevent content-length being set if page is parseable.
`void` | `flushBuffer()` Prevent buffer from being flushed if this is a page being parsed.
`char[]` | `getContents()`
`ServletOutputStream` | `getOutputStream()`
`Page` | `getPage()`
`java.io.PrintWriter` | `getWriter()`
`boolean` | `isGspSitemeshActive()`
`boolean` | `isSitemeshActive()`
`boolean` | `isUsingStream()`
`void` | `sendError(int sc)`
`void` | `sendError(int sc, java.lang.String msg)`
`void` | `sendRedirect(java.lang.String location)`
`void` | `setContentLength(int contentLength)` Prevent content-length being set if page is parseable.
`void` | `setContentType(java.lang.String type)` Set the content-type of the request and store it so it can be passed to the com.opensymphony.module.sitemesh.PageParser.
`void` | `setHeader(java.lang.String name, java.lang.String value)` Prevent content-length being set if page is parseable.
`void` | `setStatus(int sc)` If 'not modified' (304) HTTP status is being sent - then abort parsing, as there shouldn't be any body

Constructor Detail

### GrailsPageResponseWrapper

    public GrailsPageResponseWrapper(HttpServletRequest request, HttpServletResponse response, PageParserSelector parserSelector)

Method Detail

### activateSiteMesh

    public void activateSiteMesh(java.lang.String contentType, java.lang.String encoding)

### addHeader

    @Override
    public void addHeader(java.lang.String name, java.lang.String value)

  Prevent content-length being set if page is parseable.

### flushBuffer

    @Override
    public void flushBuffer()

  Prevent buffer from being flushed if this is a page being parsed.

### getContents

    public char[] getContents()

### getOutputStream

    @Override
    public ServletOutputStream getOutputStream()

### getPage

    public Page getPage()

### getWriter

    @Override
    public java.io.PrintWriter getWriter()

### isGspSitemeshActive

    public boolean isGspSitemeshActive()

### isSitemeshActive

    public boolean isSitemeshActive()

### isUsingStream

    public boolean isUsingStream()

### sendError

    @Override
    public void sendError(int sc)

### sendError

    @Override
    public void sendError(int sc, java.lang.String msg)

### sendRedirect

    @Override
    public void sendRedirect(java.lang.String location)

### setContentLength

    @Override
    public void setContentLength(int contentLength)

  Prevent content-length being set if page is parseable.

### setContentType

    @Override
    public void setContentType(java.lang.String type)

  Set the content-type of the request and store it so it can be passed to the com.opensymphony.module.sitemesh.PageParser.

### setHeader

    @Override
    public void setHeader(java.lang.String name, java.lang.String value)

  Prevent content-length being set if page is parseable.

### setStatus

    @Override
    public void setStatus(int sc)

  If 'not modified' (304) HTTP status is being sent - then abort parsing, as there shouldn't be any body

Groovy Documentation