|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.ServletResponseWrapper
javax.servlet.http.HttpServletResponseWrapper
org.apache.felix.webconsole.internal.filter.FilteringResponseWrapper
public class FilteringResponseWrapper
The FilteringResponseWrapper
wraps the response to provide a
filtering writer for HTML responses. The filtering writer filters the
response such that any string of the form ${some text}
is
replaced by a translation of the some text according to the
ResourceBundle
provided in the constructor. If no translation
exists in the resource bundle, the text is written unmodifed (except the
wrapping ${}
characters are removed.
Field Summary |
---|
Constructor Summary | |
---|---|
FilteringResponseWrapper(HttpServletResponse response,
ResourceBundle locale,
ServletRequest request)
Creates a wrapper instance using the given resource bundle for translations. |
Method Summary | |
---|---|
PrintWriter |
getWriter()
Returns a PrintWriter for the response. |
Methods inherited from class javax.servlet.http.HttpServletResponseWrapper |
---|
addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, sendError, sendError, sendRedirect, setDateHeader, setHeader, setIntHeader, setStatus, setStatus |
Methods inherited from class javax.servlet.ServletResponseWrapper |
---|
flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getOutputStream, getResponse, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentType, setLocale, setResponse |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.ServletResponse |
---|
getCharacterEncoding, getOutputStream, setContentLength, setContentType |
Constructor Detail |
---|
public FilteringResponseWrapper(HttpServletResponse response, ResourceBundle locale, ServletRequest request)
response
- the response to wraplocale
- a resource bundle, that will be used for translation of the stringsrequest
- the original request - used to obtain the variable resolverMethod Detail |
---|
public PrintWriter getWriter() throws IOException
PrintWriter
for the response. If text/html
is being generated a filtering writer is returned which translates
strings enclosed in ${}
according to the resource bundle
configured for this response.
getWriter
in interface ServletResponse
getWriter
in class javax.servlet.ServletResponseWrapper
PrintWriter
object that
can return character data to the client
UnsupportedEncodingException
- if the charset specified in
setContentType
cannot be
used
IOException
- if an input or output exception occurredServletResponseWrapper.getWriter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |