public class JspSlingHttpServletResponseWrapper extends SlingHttpServletResponseWrapper
JspSlingHttpServletResponseWrapper
class may be used by
tag library implementors to create a RenderResponse
object
which wraps the writer of the response of a given page context.
Instances of this class only support writers. Trying to get an
OutputStream
always results in an
IllegalStateException
. This is the same behaviour as
implemented by response wrappers of Apache Jasper.
Constructor and Description |
---|
JspSlingHttpServletResponseWrapper(PageContext pageContext)
Creates an instance of this response wrapper for the given
pageContext . |
Modifier and Type | Method and Description |
---|---|
ServletOutputStream |
getOutputStream()
Throws an
IllegalStateException as this wrapper only
supports writers. |
java.io.PrintWriter |
getWriter()
Returns the writer for this response wrapper.
|
void |
resetBuffer()
Resets the buffer of the JspWriter underlying the writer of this
instance.
|
adaptTo, getSlingResponse
public JspSlingHttpServletResponseWrapper(PageContext pageContext)
pageContext
. The original JspWriter is retrieved from the
page context calling the PageContext.getOut()
method. The
delegatee RenderResponse
is retrieved from the page
context by calling the TagUtil.getResponse(PageContext)
method.pageContext
- The PageContext
to use to get the
original output stream and the delegatee response.TagUtil.getResponse(PageContext)
public java.io.PrintWriter getWriter()
public ServletOutputStream getOutputStream()
IllegalStateException
as this wrapper only
supports writers.public void resetBuffer()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"