io.undertow.server.handlers.error

## Class FileErrorPageHandler

- java.lang.Object
- - io.undertow.server.handlers.error.FileErrorPageHandler

All Implemented Interfaces:
  HttpHandler

    public class FileErrorPageHandler
    extends Object
    implements HttpHandler

Handler that serves up a file from disk to serve as an error page.

This handler does not server up and response codes by default, you must configure the response codes it responds to.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static class` `FileErrorPageHandler.Builder`

### Constructor Summary

Constructors
Constructor and Description
`FileErrorPageHandler(File file, Integer... responseCodes)` Deprecated.
`FileErrorPageHandler(HttpHandler next, File file, Integer... responseCodes)` Deprecated.
`FileErrorPageHandler(HttpHandler next, Path file, Integer... responseCodes)`
`FileErrorPageHandler(HttpHandler next, Path file, MimeMappings mimeMappings, Integer... responseCodes)`
`FileErrorPageHandler(Path file, Integer... responseCodes)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Path` `getFile()`
`HttpHandler` `getNext()`
`Set<Integer>` `getResponseCodes()`
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`FileErrorPageHandler` `setFile(Path file)`
`FileErrorPageHandler` `setNext(HttpHandler next)`
`FileErrorPageHandler` `setResponseCodes(Integer... responseCodes)`
`FileErrorPageHandler` `setResponseCodes(Set<Integer> responseCodes)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### FileErrorPageHandler

    @Deprecated
    public FileErrorPageHandler(File file,
                                            Integer... responseCodes)

Deprecated.

#### FileErrorPageHandler

    public FileErrorPageHandler(Path file,
                                Integer... responseCodes)

#### FileErrorPageHandler

    @Deprecated
    public FileErrorPageHandler(HttpHandler next,
                                            File file,
                                            Integer... responseCodes)

Deprecated.

#### FileErrorPageHandler

    public FileErrorPageHandler(HttpHandler next,
                                Path file,
                                Integer... responseCodes)

#### FileErrorPageHandler

    public FileErrorPageHandler(HttpHandler next,
                                Path file,
                                MimeMappings mimeMappings,
                                Integer... responseCodes)

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### getNext

    public HttpHandler getNext()

#### setNext

    public FileErrorPageHandler setNext(HttpHandler next)

#### getResponseCodes

    public Set<Integer> getResponseCodes()

#### setResponseCodes

    public FileErrorPageHandler setResponseCodes(Set<Integer> responseCodes)

#### setResponseCodes

    public FileErrorPageHandler setResponseCodes(Integer... responseCodes)

#### getFile

    public Path getFile()

#### setFile

    public FileErrorPageHandler setFile(Path file)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`