public class GrailsContentBufferingResponse extends HttpServletResponseWrapper implements GrailsResponseMutator, StreamCharBufferLazyInitializingWriter
| Constructor and description |
|---|
GrailsContentBufferingResponse(HttpServletResponse response, ContentProcessor contentProcessor, SiteMeshWebAppContext webAppContext) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
deactivateGrailsLayout() |
|
public void |
deactivateResponseMutator() |
|
public Content |
getContent() |
|
public PageParser |
getPageParser(java.lang.String contentType) |
|
public HttpServletResponse |
getTargetResponse() |
|
public boolean |
isActive() |
|
public boolean |
isCommitted()Always report this buffering response as committed. |
|
public boolean |
isUsingStream() |
|
public void |
sendError(int sc) |
|
public void |
sendError(int sc, java.lang.String msg) |
|
public void |
sendRedirect(java.lang.String location) |
|
public void |
setContentType(java.lang.String contentType) |
|
public boolean |
shouldParsePage(java.lang.String contentType) |
Always report this buffering response as committed. This forces Spring's
org.springframework.web.servlet.view.InternalResourceView to use
include() instead of forward() for JSP views. Tomcat 11
(Jakarta Servlet 6.1) calls finish() on the underlying response
after a forward completes, which commits the real response and prevents the
layout decorator from writing decorated output. Using include avoids this.
This is safe because GrailsContentBufferingResponse is only used
inside EmbeddedGrailsLayoutView.obtainContent to capture the inner
view's output, and is discarded after content capture completes.