How make open 404.html StaticHandler vertx java

26 views
Skip to first unread message

RALF Schultzker

unread,
Aug 18, 2017, 5:59:00 AM8/18/17
to vert.x
Hello everyone. 

Plz, can you are help with add 404.html page , if my website not found content in directory, like a 1i4.ru/dafsdfasdfawwe/ 

Blake

unread,
Aug 18, 2017, 8:40:48 PM8/18/17
to vert.x
I'd say we need more info. Are you using vertx-web or what? Are you using the StaticHandler in vertx web? If you're using the StaticHandler and it fails, it will call RoutingContext.fail(), so if you register a failure handler on the router and intercept the 404 code that is sent to the failure handler then you can serve your own page from there.
Reply all
Reply to author
Forward
0 new messages