Top Description Methods
org.glassfish.grizzly.http.server

public Interface ErrorPageGenerator

Known Direct Implementers
org.glassfish.grizzly.http.server.DefaultErrorPageGenerator

Error page generator interface, which is responsible for generating of an error page corresponding to the given response status. The ErrorPageGenerator is mainly used by Response#sendError(int) and Response#sendError(int, java.lang.String) methods. The ErrorPageGenerator might be set per 1) HttpServer: HttpServer#getServerConfiguration(); 2) NetworkListener: NetworkListener#setDefaultErrorPageGenerator(org.glassfish.grizzly.http.server.ErrorPageGenerator); 3) Response: Response#setErrorPageGenerator(org.glassfish.grizzly.http.server.ErrorPageGenerator);

Method Summary

Modifier and TypeMethod and Description
public String
generate(final Request request, final int
response status
status
,
final String
response reason phrase
reasonPhrase
,
final String
extra description. Might be null
description
,
final Throwable
Throwable, that caused the error. Might be null
exception
)

Returns the HTML representation of the error page corresponding to the given HTTP response status.

Method Detail

generateback to summary
public String generate(final Request request, final int status, final String reasonPhrase, final String description, final Throwable exception)

Returns the HTML representation of the error page corresponding to the given HTTP response status.

Parameters
request:Request

Request

status:int

response status

reasonPhrase:String

response reason phrase

description:String

extra description. Might be null

exception:Throwable

Throwable, that caused the error. Might be null