servletunit.struts
Class StrutsResponseWrapper
java.lang.Object
servletunit.struts.StrutsResponseWrapper
- public class StrutsResponseWrapper
- extends java.lang.Object
A wrapper for the HttpServletResponse class. This is used in
CactusStrutsTestCase so that we can retrieve the redirect URL
set by the ActionServlet in processing an action. This allows
us to use the ActionServlet as a black box, rather than mimic
its behavior as was previously the case.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StrutsResponseWrapper
public StrutsResponseWrapper(HttpServletResponse response)
addCookie
public void addCookie(Cookie cookie)
addDateHeader
public void addDateHeader(java.lang.String name,
long date)
addHeader
public void addHeader(java.lang.String name,
java.lang.String value)
addIntHeader
public void addIntHeader(java.lang.String name,
int value)
containsHeader
public boolean containsHeader(java.lang.String name)
encodeRedirectUrl
public java.lang.String encodeRedirectUrl(java.lang.String url)
encodeRedirectURL
public java.lang.String encodeRedirectURL(java.lang.String url)
encodeUrl
public java.lang.String encodeUrl(java.lang.String url)
encodeURL
public java.lang.String encodeURL(java.lang.String url)
flushBuffer
public void flushBuffer()
throws java.io.IOException
- Throws:
java.io.IOException
getBufferSize
public int getBufferSize()
getCharacterEncoding
public java.lang.String getCharacterEncoding()
getLocale
public java.util.Locale getLocale()
getOutputStream
public ServletOutputStream getOutputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getWriter
public java.io.PrintWriter getWriter()
throws java.io.IOException
- Throws:
java.io.IOException
isCommitted
public boolean isCommitted()
reset
public void reset()
resetBuffer
public void resetBuffer()
sendError
public void sendError(int sc)
throws java.io.IOException
- Throws:
java.io.IOException
sendError
public void sendError(int sc,
java.lang.String msg)
throws java.io.IOException
- Throws:
java.io.IOException
sendRedirect
public void sendRedirect(java.lang.String location)
throws java.io.IOException
- Throws:
java.io.IOException
setBufferSize
public void setBufferSize(int size)
setContentLength
public void setContentLength(int len)
setContentType
public void setContentType(java.lang.String type)
setDateHeader
public void setDateHeader(java.lang.String name,
long date)
setHeader
public void setHeader(java.lang.String name,
java.lang.String value)
setIntHeader
public void setIntHeader(java.lang.String name,
int value)
setStatus
public void setStatus(int sc)
setStatus
public void setStatus(int sc,
java.lang.String sm)
setLocale
public void setLocale(java.util.Locale loc)
getRedirectLocation
public java.lang.String getRedirectLocation()
Copyright © Deryl Seale All Rights Reserved.