au.com.whitesquare.waf.command.response
Class HttpErrorResponse

java.lang.Object
  extended byau.com.whitesquare.waf.command.Response
      extended byau.com.whitesquare.waf.command.response.HttpErrorResponse

public class HttpErrorResponse
extends Response

This response is used to send a standard http error code, it allows applications to detect and send 404's, 503's and such. This can be usfully used when application pages are no longer used but commands still exist for these files.

Last Modified: $Date: 2005/01/03 11:00:19 $

Version:
$Revision: 1.2 $
Author:
Steve Mactaggart

Field Summary
 
Fields inherited from class au.com.whitesquare.waf.command.Response
servletContext
 
Constructor Summary
HttpErrorResponse()
          Sends a default Http Error, using the error code 404 (HttpServletResponse.SC_NOT_FOUND).
HttpErrorResponse(int errorCode)
           
HttpErrorResponse(int errorCode, String message)
           
HttpErrorResponse(String message)
          Sends a default Http Error, using the error code 404 (HttpServletResponse.SC_NOT_FOUND) along with the specified error message.
 
Method Summary
 void sendResponse(HttpServletRequest req, HttpServletResponse resp)
           
 
Methods inherited from class au.com.whitesquare.waf.command.Response
init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpErrorResponse

public HttpErrorResponse(int errorCode)
Parameters:
errorCode - The http error code to send to the client

HttpErrorResponse

public HttpErrorResponse(int errorCode,
                         String message)

HttpErrorResponse

public HttpErrorResponse()
Sends a default Http Error, using the error code 404 (HttpServletResponse.SC_NOT_FOUND).


HttpErrorResponse

public HttpErrorResponse(String message)
Sends a default Http Error, using the error code 404 (HttpServletResponse.SC_NOT_FOUND) along with the specified error message.

Method Detail

sendResponse

public void sendResponse(HttpServletRequest req,
                         HttpServletResponse resp)
                  throws Exception
Specified by:
sendResponse in class Response
Parameters:
req -
resp -
Throws:
Exception
See Also:
Response.sendResponse(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)


Copyright © 2004 Whitesquare Software. All Rights Reserved.