Tabnine Logo
notFound
Code IndexAdd Tabnine to your IDE (free)

How to use
notFound
in
views.html.defaultpages

Best Java code snippets using views.html.defaultpages.notFound (Showing top 4 results out of 315)

origin: com.typesafe.play/play_2.11

/**
 * 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()
    )));
  }
}
origin: com.typesafe.play/play

/**
 * 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()
    )));
  }
}
origin: com.typesafe.play/play_2.12

/**
 * 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()
    )));
  }
}
origin: com.typesafe.play/play_2.10

/**
 * 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())
    )));
  }
}
views.html.defaultpagesnotFound

Most used methods

  • render

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JFrame (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now