public class ErrorResolution extends java.lang.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,
java.lang.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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by the Stripes dispatcher to invoke the Resolution.
|
int |
getErrorCode()
Accessor for the HTTP status code.
|
java.lang.String |
getErrorMessage()
Accessor for the descriptive error message.
|
void |
setErrorCode(int errorCode)
Setter for the HTTP status code.
|
void |
setErrorMessage(java.lang.String errorMessage)
Setter for the descriptive error message.
|
public ErrorResolution(int errorCode)
errorCode - the HTTP status codepublic ErrorResolution(int errorCode,
java.lang.String errorMessage)
errorCode - the HTTP status codeerrorMessage - a descriptive messagepublic void execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
Resolutionexecute in interface Resolutionrequest - the current HttpServletRequestresponse - the current HttpServletResponsejava.lang.Exception - exceptions of any type may be thrown if the Resolution cannot be
executed as intendedpublic int getErrorCode()
public void setErrorCode(int errorCode)
public java.lang.String getErrorMessage()
public void setErrorMessage(java.lang.String errorMessage)
? Copyright 2005-2006, Stripes Development Team.