congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
notFound.render
Code IndexAdd Tabnine to your IDE (free)

How to use
render
method
in
views.html.defaultpages.notFound

Best Java code snippets using views.html.defaultpages.notFound.render (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.defaultpagesnotFoundrender

Popular methods of notFound

    Popular in Java

    • Reactive rest calls using spring rest template
    • getSharedPreferences (Context)
    • runOnUiThread (Activity)
    • scheduleAtFixedRate (Timer)
    • Path (java.nio.file)
    • Calendar (java.util)
      Calendar is an abstract base class for converting between a Date object and a set of integer fields
    • TimerTask (java.util)
      The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
    • JLabel (javax.swing)
    • Response (javax.ws.rs.core)
      Defines the contract between a returned instance and the runtime when an application needs to provid
    • BasicDataSource (org.apache.commons.dbcp)
      Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
    • Top 17 Free Sublime Text Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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