org.apache.wicket.protocol.http.servlet
Class AbortWithHttpStatusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.wicket.AbortException
org.apache.wicket.AbstractRestartResponseException
org.apache.wicket.protocol.http.servlet.AbortWithHttpStatusException
- All Implemented Interfaces:
- Serializable
public class AbortWithHttpStatusException
- extends AbstractRestartResponseException
Causes Wicket to abort processing and set the specified HTTP status code. An
IllegalStateException
will be thrown if HTTP status code could not be set and the
optional parameter is specified as false.
This exception can be thrown from a page or a resource.
- Author:
- Igor Vaynberg (ivaynberg), Gili Tzabari
- See Also:
HttpServletResponse
,
Serialized Form
AbortWithHttpStatusException
public AbortWithHttpStatusException(int status,
boolean statusCodeOptional)
- Constructor
- Parameters:
status
- The http response status codestatusCodeOptional
- If false (meaning the http status is not required to be set), an
IllegalStateException will be thrown
getStatus
public final int getStatus()
- Returns:
- the response status code
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.