public class ErrorResolution extends Object implements Resolution
| Constructor and Description |
|---|
ErrorResolution(int errorCode)
Sends an error response to the client using the specified status code and clears the buffer.
|
ErrorResolution(int errorCode,
String errorMessage)
Sends an error response to the client using the specified status code and message and clears
the buffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(HttpServletRequest request,
HttpServletResponse response)
Called by the Stripes dispatcher to invoke the Resolution.
|
int |
getErrorCode()
Accessor for the HTTP status code.
|
String |
getErrorMessage()
Accessor for the descriptive error message.
|
void |
setErrorCode(int errorCode)
Setter for the HTTP status code.
|
void |
setErrorMessage(String errorMessage)
Setter for the descriptive error message.
|
public ErrorResolution(int errorCode)
errorCode - the HTTP status codepublic ErrorResolution(int errorCode,
String errorMessage)
errorCode - the HTTP status codeerrorMessage - a descriptive messagepublic void execute(HttpServletRequest request, HttpServletResponse response) throws Exception
Resolutionexecute in interface Resolutionrequest - the current HttpServletRequestresponse - the current HttpServletResponseException - exceptions of any type may be thrown if the Resolution cannot be
executed as intendedpublic int getErrorCode()
public void setErrorCode(int errorCode)
public String getErrorMessage()
public void setErrorMessage(String errorMessage)
© Copyright 2005-2006, Stripes Development Team.