/** * Generates a 404 NOT_FOUND chunked result. */ public static Status notFound(InputStream content) { return notFound(content, defaultChunkSize); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @return the result */ public static Result notFound(File content) { return notFound(content, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param filename The name to send the file as. * @return the result */ public static Result notFound(File content, String filename) { return notFound(content, filename, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @return the result */ public static Result notFound(File content) { return notFound(content, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param inline Whether the file should be sent inline, or as an attachment. * @return the result */ public static Result notFound(File content, boolean inline) { return notFound(content, inline, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @return the result */ public static Result notFound(File content) { return notFound(content, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param filename The name to send the file as. * @return the result */ public static Result notFound(File content, String filename) { return notFound(content, filename, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param inline Whether the file should be sent inline, or as an attachment. * @return the result */ public static Result notFound(File content, boolean inline) { return notFound(content, inline, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param inline Whether the file should be sent inline, or as an attachment. * @return the result */ public static Result notFound(File content, boolean inline) { return notFound(content, inline, StaticFileMimeTypes.fileMimeTypes()); }
/** * Generates a 404 Not Found result. * * @param content The file to send. * @param filename The name to send the file as. * @return the result */ public static Result notFound(File content, String filename) { return notFound(content, filename, StaticFileMimeTypes.fileMimeTypes()); }
/** * Invoked when a handler or resource is not found. * <p> * If the environment's mode is production, then returns Results.notFound (404) with the included template from `views.html.defaultpages.notFound` as the content. * <p> * Otherwise, Results.notFound (404) is rendered with {@code views.html.defaultpages.devNotFound} template. * * @param request The request that no handler was found to handle. * @param message A message, which is not used by the default implementation. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onNotFound(RequestHeader request, String message) { if (environment.isProd()) { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.notFound.render( request.method(), request.uri(), request.asScala()))); } else { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.devNotFound.render( request.method(), request.uri(), Some.apply(routes.get()), request.asScala() ))); } }
/** * Invoked when a handler or resource is not found. * <p> * If the environment's mode is production, then returns Results.notFound (404) with the included template from `views.html.defaultpages.notFound` as the content. * <p> * Otherwise, Results.notFound (404) is rendered with {@code views.html.defaultpages.devNotFound} template. * * @param request The request that no handler was found to handle. * @param message A message, which is not used by the default implementation. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onNotFound(RequestHeader request, String message) { if (environment.isProd()) { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.notFound.render( request.method(), request.uri(), request.asScala()))); } else { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.devNotFound.render( request.method(), request.uri(), Some.apply(routes.get()), request.asScala() ))); } }
/** * Invoked when a handler or resource is not found. * <p> * If the environment's mode is production, then returns Results.notFound (404) with the included template from `views.html.defaultpages.notFound` as the content. * <p> * Otherwise, Results.notFound (404) is rendered with {@code views.html.defaultpages.devNotFound} template. * * @param request The request that no handler was found to handle. * @param message A message, which is not used by the default implementation. * @return a CompletionStage containing the Result. */ protected CompletionStage<Result> onNotFound(RequestHeader request, String message) { if (environment.isProd()) { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.notFound.render( request.method(), request.uri(), request.asScala()))); } else { return CompletableFuture.completedFuture(Results.notFound(views.html.defaultpages.devNotFound.render( request.method(), request.uri(), Some.apply(routes.get()), request.asScala() ))); } }
/** * Invoked when a handler or resource is not found. * * @param request The request that no handler was found to handle. * @param message A message. */ protected F.Promise<Result> onNotFound(RequestHeader request, String message){ if (environment.isProd()) { return F.Promise.<Result>pure(Results.notFound(views.html.defaultpages.notFound.render( request.method(), request.uri()))); } else { return F.Promise.<Result>pure(Results.notFound(views.html.defaultpages.devNotFound.render( request.method(), request.uri(), Some.apply(routes.get()) ))); } }
public F.Promise<Result> onHandlerNotFound(Http.RequestHeader request) { ErrorResponse er = apply(NOT_FOUND, "URI not found", apply$default$3(), Some.apply(request.path())); return F.Promise.pure(notFound(toJson(er))); }
return Results.notFound("Unknown session ID: " + sessionId);
return Results.notFound("Unknown session ID: " + sessionId);
return Results.notFound("Unknown session ID: " + sessionId);
public Future<play.api.mvc.Result> onHandlerNotFound(play.api.mvc.RequestHeader request) { ErrorResponse er = apply(NOT_FOUND, "URI not found", apply$default$3(), Some.apply(request.path())); return Futures.successful(notFound(toJson(er)).toScala()); }