Object/Class

controllers

Assets

Related Docs: class Assets | package controllers

Permalink

object Assets extends AssetsBuilder

Controller that serves static resources.

Resources are searched in the classpath.

It handles Last-Modified and ETag header automatically. If a gzipped version of a resource is found (Same resource name with the .gz suffix), it is served instead. If a digest file is available for a given asset then its contents are read and used to supply a digest value. This value will be used for serving up ETag values and for the purposes of reverse routing. For example given "a.js", if there is an "a.js.md5" file available then the latter contents will be used to determine the Etag value. The reverse router also uses the digest in order to translate any file to the form <digest>-<asset> for example "a.js" may be also found at "d41d8cd98f00b204e9800998ecf8427e-a.js". If there is no digest file found then digest values for ETags are formed by forming a sha1 digest of the last-modified time.

The default digest algorithm to search for is "md5". You can override this quite easily. For example if the SHA-1 algorithm is preferred:

"play.assets.digest.algorithm" = "sha1"

You can set a custom Cache directive for a particular resource if needed. For example in your application.conf file:

"play.assets.cache./public/images/logo.png" = "max-age=3600"

You can use this controller in any application, just by declaring the appropriate route. For example:

GET     /assets/*file               controllers.Assets.at(path="/public", file)
Source
Assets.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Assets
  2. AssetsBuilder
  3. BaseController
  4. RequestMethods
  5. Rendering
  6. RequestExtractors
  7. AcceptExtractors
  8. ContentTypes
  9. HeaderNames
  10. Status
  11. HttpProtocol
  12. Results
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Asset(name: String) extends Product with Serializable

    Permalink

    An asset.

    An asset.

    name

    The name of the asset.

  2. class Status extends Result

    Permalink

    Generates default Result from a content type, headers and content.

    Generates default Result from a content type, headers and content.

    Definition Classes
    Results

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. object &

    Permalink

    Convenient extractor allowing to apply two extractors.

    Convenient extractor allowing to apply two extractors. Example of use:

    request match {
      case Accepts.Json() & Accepts.Html() => "This request accepts both JSON and HTML"
    }
    Definition Classes
    RequestExtractors
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. val ACCEPT: String

    Permalink
    Definition Classes
    HeaderNames
  6. val ACCEPTED: Int

    Permalink
    Definition Classes
    Status
  7. val ACCEPT_CHARSET: String

    Permalink
    Definition Classes
    HeaderNames
  8. val ACCEPT_ENCODING: String

    Permalink
    Definition Classes
    HeaderNames
  9. val ACCEPT_LANGUAGE: String

    Permalink
    Definition Classes
    HeaderNames
  10. val ACCEPT_RANGES: String

    Permalink
    Definition Classes
    HeaderNames
  11. val ACCESS_CONTROL_ALLOW_CREDENTIALS: String

    Permalink
    Definition Classes
    HeaderNames
  12. val ACCESS_CONTROL_ALLOW_HEADERS: String

    Permalink
    Definition Classes
    HeaderNames
  13. val ACCESS_CONTROL_ALLOW_METHODS: String

    Permalink
    Definition Classes
    HeaderNames
  14. val ACCESS_CONTROL_ALLOW_ORIGIN: String

    Permalink
    Definition Classes
    HeaderNames
  15. val ACCESS_CONTROL_EXPOSE_HEADERS: String

    Permalink
    Definition Classes
    HeaderNames
  16. val ACCESS_CONTROL_MAX_AGE: String

    Permalink
    Definition Classes
    HeaderNames
  17. val ACCESS_CONTROL_REQUEST_HEADERS: String

    Permalink
    Definition Classes
    HeaderNames
  18. val ACCESS_CONTROL_REQUEST_METHOD: String

    Permalink
    Definition Classes
    HeaderNames
  19. val AGE: String

    Permalink
    Definition Classes
    HeaderNames
  20. val ALLOW: String

    Permalink
    Definition Classes
    HeaderNames
  21. val AUTHORIZATION: String

    Permalink
    Definition Classes
    HeaderNames
  22. val Accepted: Status

    Permalink

    Generates a ‘202 ACCEPTED’ result.

    Generates a ‘202 ACCEPTED’ result.

    Definition Classes
    Results
  23. object Accepts

    Permalink

    Common extractors to check if a request accepts JSON, Html, etc.

    Common extractors to check if a request accepts JSON, Html, etc. Example of use:

    request match {
      case Accepts.Json() => Ok(toJson(value))
      case _ => Ok(views.html.show(value))
    }
    Definition Classes
    AcceptExtractors
  24. object Asset extends Serializable

    Permalink
  25. val BAD_GATEWAY: Int

    Permalink
    Definition Classes
    Status
  26. val BAD_REQUEST: Int

    Permalink
    Definition Classes
    Status
  27. val BINARY: String

    Permalink

    Content-Type of binary data.

    Content-Type of binary data.

    Definition Classes
    ContentTypes
  28. val BadGateway: Status

    Permalink

    Generates a ‘502 BAD_GATEWAY’ result.

    Generates a ‘502 BAD_GATEWAY’ result.

    Definition Classes
    Results
  29. val BadRequest: Status

    Permalink

    Generates a ‘400 BAD_REQUEST’ result.

    Generates a ‘400 BAD_REQUEST’ result.

    Definition Classes
    Results
  30. val CACHE_CONTROL: String

    Permalink
    Definition Classes
    HeaderNames
  31. val CACHE_MANIFEST: String

    Permalink

    Content-Type of application cache.

    Content-Type of application cache.

    Definition Classes
    ContentTypes
  32. val CHUNKED: String

    Permalink
    Definition Classes
    HttpProtocol
  33. val CONFLICT: Int

    Permalink
    Definition Classes
    Status
  34. val CONNECTION: String

    Permalink
    Definition Classes
    HeaderNames
  35. val CONTENT_DISPOSITION: String

    Permalink
    Definition Classes
    HeaderNames
  36. val CONTENT_ENCODING: String

    Permalink
    Definition Classes
    HeaderNames
  37. val CONTENT_LANGUAGE: String

    Permalink
    Definition Classes
    HeaderNames
  38. val CONTENT_LENGTH: String

    Permalink
    Definition Classes
    HeaderNames
  39. val CONTENT_LOCATION: String

    Permalink
    Definition Classes
    HeaderNames
  40. val CONTENT_MD5: String

    Permalink
    Definition Classes
    HeaderNames
  41. val CONTENT_RANGE: String

    Permalink
    Definition Classes
    HeaderNames
  42. val CONTENT_TRANSFER_ENCODING: String

    Permalink
    Definition Classes
    HeaderNames
  43. val CONTENT_TYPE: String

    Permalink
    Definition Classes
    HeaderNames
  44. val CONTINUE: Int

    Permalink
    Definition Classes
    Status
  45. val COOKIE: String

    Permalink
    Definition Classes
    HeaderNames
  46. val CREATED: Int

    Permalink
    Definition Classes
    Status
  47. def CSS(implicit codec: Codec): String

    Permalink

    Content-Type of css.

    Content-Type of css.

    Definition Classes
    ContentTypes
  48. val Conflict: Status

    Permalink

    Generates a ‘409 CONFLICT’ result.

    Generates a ‘409 CONFLICT’ result.

    Definition Classes
    Results
  49. val Continue: Result

    Permalink

    Generates a ‘100 Continue’ result.

    Generates a ‘100 Continue’ result.

    Definition Classes
    Results
  50. val Created: Status

    Permalink

    Generates a ‘201 CREATED’ result.

    Generates a ‘201 CREATED’ result.

    Definition Classes
    Results
  51. val DATE: String

    Permalink
    Definition Classes
    HeaderNames
  52. val ETAG: String

    Permalink
    Definition Classes
    HeaderNames
  53. def EVENT_STREAM(implicit codec: Codec): String

    Permalink

    Content-Type of server sent events.

    Content-Type of server sent events.

    Definition Classes
    ContentTypes
  54. val EXPECT: String

    Permalink
    Definition Classes
    HeaderNames
  55. val EXPECTATION_FAILED: Int

    Permalink
    Definition Classes
    Status
  56. val EXPIRES: String

    Permalink
    Definition Classes
    HeaderNames
  57. val EntityTooLarge: Status

    Permalink

    Generates a ‘413 REQUEST_ENTITY_TOO_LARGE’ result.

    Generates a ‘413 REQUEST_ENTITY_TOO_LARGE’ result.

    Definition Classes
    Results
  58. val ExpectationFailed: Status

    Permalink

    Generates a ‘417 EXPECTATION_FAILED’ result.

    Generates a ‘417 EXPECTATION_FAILED’ result.

    Definition Classes
    Results
  59. val FAILED_DEPENDENCY: Int

    Permalink
    Definition Classes
    Status
  60. val FORBIDDEN: Int

    Permalink
    Definition Classes
    Status
  61. val FORM: String

    Permalink

    Content-Type of form-urlencoded.

    Content-Type of form-urlencoded. This content type does not define a charset parameter.

    Definition Classes
    ContentTypes
  62. val FORWARDED: String

    Permalink
    Definition Classes
    HeaderNames
  63. val FOUND: Int

    Permalink
    Definition Classes
    Status
  64. val FROM: String

    Permalink
    Definition Classes
    HeaderNames
  65. val FailedDependency: Status

    Permalink

    Generates a ‘424 FAILED_DEPENDENCY’ result.

    Generates a ‘424 FAILED_DEPENDENCY’ result.

    Definition Classes
    Results
  66. val Forbidden: Status

    Permalink

    Generates a ‘403 FORBIDDEN’ result.

    Generates a ‘403 FORBIDDEN’ result.

    Definition Classes
    Results
  67. def Found(url: String): Result

    Permalink

    Generates a ‘302 FOUND’ simple result.

    Generates a ‘302 FOUND’ simple result.

    url

    the URL to redirect to

    Definition Classes
    Results
  68. val GATEWAY_TIMEOUT: Int

    Permalink
    Definition Classes
    Status
  69. val GONE: Int

    Permalink
    Definition Classes
    Status
  70. val GatewayTimeout: Status

    Permalink

    Generates a ‘504 GATEWAY_TIMEOUT’ result.

    Generates a ‘504 GATEWAY_TIMEOUT’ result.

    Definition Classes
    Results
  71. val Gone: Status

    Permalink

    Generates a ‘410 GONE’ result.

    Generates a ‘410 GONE’ result.

    Definition Classes
    Results
  72. val HOST: String

    Permalink
    Definition Classes
    HeaderNames
  73. def HTML(implicit codec: Codec): String

    Permalink

    Content-Type of html.

    Content-Type of html.

    Definition Classes
    ContentTypes
  74. val HTTP_1_0: String

    Permalink
    Definition Classes
    HttpProtocol
  75. val HTTP_1_1: String

    Permalink
    Definition Classes
    HttpProtocol
  76. val HTTP_VERSION_NOT_SUPPORTED: Int

    Permalink
    Definition Classes
    Status
  77. val HttpVersionNotSupported: Status

    Permalink

    Generates a ‘505 HTTP_VERSION_NOT_SUPPORTED’ result.

    Generates a ‘505 HTTP_VERSION_NOT_SUPPORTED’ result.

    Definition Classes
    Results
  78. val IF_MATCH: String

    Permalink
    Definition Classes
    HeaderNames
  79. val IF_MODIFIED_SINCE: String

    Permalink
    Definition Classes
    HeaderNames
  80. val IF_NONE_MATCH: String

    Permalink
    Definition Classes
    HeaderNames
  81. val IF_RANGE: String

    Permalink
    Definition Classes
    HeaderNames
  82. val IF_UNMODIFIED_SINCE: String

    Permalink
    Definition Classes
    HeaderNames
  83. val IM_A_TEAPOT: Int

    Permalink
    Definition Classes
    Status
  84. val INSUFFICIENT_STORAGE: Int

    Permalink
    Definition Classes
    Status
  85. val INTERNAL_SERVER_ERROR: Int

    Permalink
    Definition Classes
    Status
  86. val ImATeapot: Status

    Permalink

    Generates a ‘418 IM_A_TEAPOT’ result.

    Generates a ‘418 IM_A_TEAPOT’ result.

    Definition Classes
    Results
  87. val InsufficientStorage: Status

    Permalink

    Generates a ‘507 INSUFFICIENT_STORAGE’ result.

    Generates a ‘507 INSUFFICIENT_STORAGE’ result.

    Definition Classes
    Results
  88. val InternalServerError: Status

    Permalink

    Generates a ‘500 INTERNAL_SERVER_ERROR’ result.

    Generates a ‘500 INTERNAL_SERVER_ERROR’ result.

    Definition Classes
    Results
  89. def JAVASCRIPT(implicit codec: Codec): String

    Permalink

    Content-Type of javascript.

    Content-Type of javascript.

    Definition Classes
    ContentTypes
  90. val JSON: String

    Permalink

    Content-Type of json.

    Content-Type of json. This content type does not define a charset parameter.

    Definition Classes
    ContentTypes
  91. val LAST_MODIFIED: String

    Permalink
    Definition Classes
    HeaderNames
  92. val LENGTH_REQUIRED: Int

    Permalink
    Definition Classes
    Status
  93. val LINK: String

    Permalink
    Definition Classes
    HeaderNames
  94. val LOCATION: String

    Permalink
    Definition Classes
    HeaderNames
  95. val LOCKED: Int

    Permalink
    Definition Classes
    Status
  96. val Locked: Status

    Permalink

    Generates a ‘423 LOCKED’ result.

    Generates a ‘423 LOCKED’ result.

    Definition Classes
    Results
  97. val MAX_FORWARDS: String

    Permalink
    Definition Classes
    HeaderNames
  98. val METHOD_NOT_ALLOWED: Int

    Permalink
    Definition Classes
    Status
  99. val MOVED_PERMANENTLY: Int

    Permalink
    Definition Classes
    Status
  100. val MULTIPLE_CHOICES: Int

    Permalink
    Definition Classes
    Status
  101. val MULTI_STATUS: Int

    Permalink
    Definition Classes
    Status
  102. val MethodNotAllowed: Status

    Permalink

    Generates a ‘405 METHOD_NOT_ALLOWED’ result.

    Generates a ‘405 METHOD_NOT_ALLOWED’ result.

    Definition Classes
    Results
  103. def MovedPermanently(url: String): Result

    Permalink

    Generates a ‘301 MOVED_PERMANENTLY’ simple result.

    Generates a ‘301 MOVED_PERMANENTLY’ simple result.

    url

    the URL to redirect to

    Definition Classes
    Results
  104. val MultiStatus: Status

    Permalink

    Generates a ‘207 MULTI_STATUS’ result.

    Generates a ‘207 MULTI_STATUS’ result.

    Definition Classes
    Results
  105. val NON_AUTHORITATIVE_INFORMATION: Int

    Permalink
    Definition Classes
    Status
  106. val NOT_ACCEPTABLE: Int

    Permalink
    Definition Classes
    Status
  107. val NOT_FOUND: Int

    Permalink
    Definition Classes
    Status
  108. val NOT_IMPLEMENTED: Int

    Permalink
    Definition Classes
    Status
  109. val NOT_MODIFIED: Int

    Permalink
    Definition Classes
    Status
  110. val NO_CONTENT: Int

    Permalink
    Definition Classes
    Status
  111. val NoContent: Result

    Permalink

    Generates a ‘204 NO_CONTENT’ result.

    Generates a ‘204 NO_CONTENT’ result.

    Definition Classes
    Results
  112. val NonAuthoritativeInformation: Status

    Permalink

    Generates a ‘203 NON_AUTHORITATIVE_INFORMATION’ result.

    Generates a ‘203 NON_AUTHORITATIVE_INFORMATION’ result.

    Definition Classes
    Results
  113. val NotAcceptable: Status

    Permalink

    Generates a ‘406 NOT_ACCEPTABLE’ result.

    Generates a ‘406 NOT_ACCEPTABLE’ result.

    Definition Classes
    Results
  114. val NotFound: Status

    Permalink

    Generates a ‘404 NOT_FOUND’ result.

    Generates a ‘404 NOT_FOUND’ result.

    Definition Classes
    Results
  115. val NotImplemented: Status

    Permalink

    Generates a ‘501 NOT_IMPLEMENTED’ result.

    Generates a ‘501 NOT_IMPLEMENTED’ result.

    Definition Classes
    Results
  116. val NotModified: Result

    Permalink

    Generates a ‘304 NOT_MODIFIED’ result.

    Generates a ‘304 NOT_MODIFIED’ result.

    Definition Classes
    Results
  117. val OK: Int

    Permalink
    Definition Classes
    Status
  118. val ORIGIN: String

    Permalink
    Definition Classes
    HeaderNames
  119. val Ok: Status

    Permalink

    Generates a ‘200 OK’ result.

    Generates a ‘200 OK’ result.

    Definition Classes
    Results
  120. val PARTIAL_CONTENT: Int

    Permalink
    Definition Classes
    Status
  121. val PAYMENT_REQUIRED: Int

    Permalink
    Definition Classes
    Status
  122. val PERMANENT_REDIRECT: Int

    Permalink
    Definition Classes
    Status
  123. val PRAGMA: String

    Permalink
    Definition Classes
    HeaderNames
  124. val PRECONDITION_FAILED: Int

    Permalink
    Definition Classes
    Status
  125. val PROXY_AUTHENTICATE: String

    Permalink
    Definition Classes
    HeaderNames
  126. val PROXY_AUTHENTICATION_REQUIRED: Int

    Permalink
    Definition Classes
    Status
  127. val PROXY_AUTHORIZATION: String

    Permalink
    Definition Classes
    HeaderNames
  128. val PartialContent: Status

    Permalink

    Generates a ‘206 PARTIAL_CONTENT’ result.

    Generates a ‘206 PARTIAL_CONTENT’ result.

    Definition Classes
    Results
  129. val PaymentRequired: Status

    Permalink

    Generates a ‘402 PAYMENT_REQUIRED’ result.

    Generates a ‘402 PAYMENT_REQUIRED’ result.

    Definition Classes
    Results
  130. def PermanentRedirect(url: String): Result

    Permalink

    Generates a ‘308 PERMANENT_REDIRECT’ simple result.

    Generates a ‘308 PERMANENT_REDIRECT’ simple result.

    url

    the URL to redirect to

    Definition Classes
    Results
  131. val PreconditionFailed: Status

    Permalink

    Generates a ‘412 PRECONDITION_FAILED’ result.

    Generates a ‘412 PRECONDITION_FAILED’ result.

    Definition Classes
    Results
  132. val RANGE: String

    Permalink
    Definition Classes
    HeaderNames
  133. val REFERER: String

    Permalink
    Definition Classes
    HeaderNames
  134. val REQUESTED_RANGE_NOT_SATISFIABLE: Int

    Permalink
    Definition Classes
    Status
  135. val REQUEST_ENTITY_TOO_LARGE: Int

    Permalink
    Definition Classes
    Status
  136. val REQUEST_TIMEOUT: Int

    Permalink
    Definition Classes
    Status
  137. val REQUEST_URI_TOO_LONG: Int

    Permalink
    Definition Classes
    Status
  138. val RESET_CONTENT: Int

    Permalink
    Definition Classes
    Status
  139. val RETRY_AFTER: String

    Permalink
    Definition Classes
    HeaderNames
  140. def Redirect(call: Call, status: Int): Result

    Permalink

    Generates a redirect simple result.

    Generates a redirect simple result.

    call

    Call defining the URL to redirect to, which typically comes from the reverse router

    status

    HTTP status for redirect, such as SEE_OTHER, MOVED_TEMPORARILY or MOVED_PERMANENTLY

    Definition Classes
    Results
  141. def Redirect(call: Call): Result

    Permalink

    Generates a redirect simple result.

    Generates a redirect simple result.

    call

    Call defining the URL to redirect to, which typically comes from the reverse router

    Definition Classes
    Results
  142. def Redirect(url: String, queryString: Map[String, Seq[String]] = Map.empty, status: Int = SEE_OTHER): Result

    Permalink

    Generates a redirect simple result.

    Generates a redirect simple result.

    url

    the URL to redirect to

    queryString

    queryString parameters to add to the queryString

    status

    HTTP status for redirect, such as SEE_OTHER, MOVED_TEMPORARILY or MOVED_PERMANENTLY

    Definition Classes
    Results
  143. def Redirect(url: String, status: Int): Result

    Permalink

    Generates a redirect simple result.

    Generates a redirect simple result.

    url

    the URL to redirect to

    status

    HTTP status

    Definition Classes
    Results
  144. val RequestTimeout: Status

    Permalink

    Generates a ‘408 REQUEST_TIMEOUT’ result.

    Generates a ‘408 REQUEST_TIMEOUT’ result.

    Definition Classes
    Results
  145. val ResetContent: Result

    Permalink

    Generates a ‘205 RESET_CONTENT’ result.

    Generates a ‘205 RESET_CONTENT’ result.

    Definition Classes
    Results
  146. val SEE_OTHER: Int

    Permalink
    Definition Classes
    Status
  147. val SERVER: String

    Permalink
    Definition Classes
    HeaderNames
  148. val SERVICE_UNAVAILABLE: Int

    Permalink
    Definition Classes
    Status
  149. val SET_COOKIE: String

    Permalink
    Definition Classes
    HeaderNames
  150. val SET_COOKIE2: String

    Permalink
    Definition Classes
    HeaderNames
  151. val STRICT_TRANSPORT_SECURITY: String

    Permalink
    Definition Classes
    HeaderNames
  152. val SWITCHING_PROTOCOLS: Int

    Permalink
    Definition Classes
    Status
  153. def SeeOther(url: String): Result

    Permalink

    Generates a ‘303 SEE_OTHER’ simple result.

    Generates a ‘303 SEE_OTHER’ simple result.

    url

    the URL to redirect to

    Definition Classes
    Results
  154. val ServiceUnavailable: Status

    Permalink

    Generates a ‘503 SERVICE_UNAVAILABLE’ result.

    Generates a ‘503 SERVICE_UNAVAILABLE’ result.

    Definition Classes
    Results
  155. def Status(code: Int): Status

    Permalink

    Generates a simple result.

    Generates a simple result.

    code

    the status code

    Definition Classes
    Results
  156. val SwitchingProtocols: Result

    Permalink

    Generates a ‘101 Switching Protocols’ result.

    Generates a ‘101 Switching Protocols’ result.

    Definition Classes
    Results
  157. val TE: String

    Permalink
    Definition Classes
    HeaderNames
  158. val TEMPORARY_REDIRECT: Int

    Permalink
    Definition Classes
    Status
  159. def TEXT(implicit codec: Codec): String

    Permalink

    Content-Type of text.

    Content-Type of text.

    Definition Classes
    ContentTypes
  160. val TOO_MANY_REQUESTS: Int

    Permalink
    Definition Classes
    Status
  161. val TRAILER: String

    Permalink
    Definition Classes
    HeaderNames
  162. val TRANSFER_ENCODING: String

    Permalink
    Definition Classes
    HeaderNames
  163. def TemporaryRedirect(url: String): Result

    Permalink

    Generates a ‘307 TEMPORARY_REDIRECT’ simple result.

    Generates a ‘307 TEMPORARY_REDIRECT’ simple result.

    url

    the URL to redirect to

    Definition Classes
    Results
  164. val TooManyRequests: Status

    Permalink

    Generates a ‘429 TOO_MANY_REQUESTS’ result.

    Generates a ‘429 TOO_MANY_REQUESTS’ result.

    Definition Classes
    Results
  165. val UNAUTHORIZED: Int

    Permalink
    Definition Classes
    Status
  166. val UNPROCESSABLE_ENTITY: Int

    Permalink
    Definition Classes
    Status
  167. val UNSUPPORTED_MEDIA_TYPE: Int

    Permalink
    Definition Classes
    Status
  168. val UPGRADE: String

    Permalink
    Definition Classes
    HeaderNames
  169. val UPGRADE_REQUIRED: Int

    Permalink
    Definition Classes
    Status
  170. val USER_AGENT: String

    Permalink
    Definition Classes
    HeaderNames
  171. val USE_PROXY: Int

    Permalink
    Definition Classes
    Status
  172. val Unauthorized: Status

    Permalink

    Generates a ‘401 UNAUTHORIZED’ result.

    Generates a ‘401 UNAUTHORIZED’ result.

    Definition Classes
    Results
  173. val UnprocessableEntity: Status

    Permalink

    Generates a ‘422 UNPROCESSABLE_ENTITY’ result.

    Generates a ‘422 UNPROCESSABLE_ENTITY’ result.

    Definition Classes
    Results
  174. val UnsupportedMediaType: Status

    Permalink

    Generates a ‘415 UNSUPPORTED_MEDIA_TYPE’ result.

    Generates a ‘415 UNSUPPORTED_MEDIA_TYPE’ result.

    Definition Classes
    Results
  175. val UriTooLong: Status

    Permalink

    Generates a ‘414 REQUEST_URI_TOO_LONG’ result.

    Generates a ‘414 REQUEST_URI_TOO_LONG’ result.

    Definition Classes
    Results
  176. val VARY: String

    Permalink
    Definition Classes
    HeaderNames
  177. val VIA: String

    Permalink
    Definition Classes
    HeaderNames
  178. val WARNING: String

    Permalink
    Definition Classes
    HeaderNames
  179. val WWW_AUTHENTICATE: String

    Permalink
    Definition Classes
    HeaderNames
  180. def XHTML(implicit codec: Codec): String

    Permalink

    Content-Type of xhtml.

    Content-Type of xhtml.

    Definition Classes
    ContentTypes
  181. def XML(implicit codec: Codec): String

    Permalink

    Content-Type of xml.

    Content-Type of xml.

    Definition Classes
    ContentTypes
  182. val X_FORWARDED_FOR: String

    Permalink
    Definition Classes
    HeaderNames
  183. val X_FORWARDED_HOST: String

    Permalink
    Definition Classes
    HeaderNames
  184. val X_FORWARDED_PORT: String

    Permalink
    Definition Classes
    HeaderNames
  185. val X_FORWARDED_PROTO: String

    Permalink
    Definition Classes
    HeaderNames
  186. val X_REQUESTED_WITH: String

    Permalink
    Definition Classes
    HeaderNames
  187. val alternativeDateFormatWithTZOffset: DateTimeFormatter

    Permalink
  188. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  189. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  190. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  191. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  192. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  193. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  194. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  195. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  196. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  197. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  198. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  199. def parseModifiedDate(date: String): Option[Date]

    Permalink
  200. object render

    Permalink
    Definition Classes
    Rendering
  201. implicit def request2flash(implicit request: RequestHeader): Flash

    Permalink

    Retrieve the flash scope implicitly from the request.

    Retrieve the flash scope implicitly from the request.

    For example:

    def index(name:String) = Action { implicit request =>
      val message = request2flash("message")
      Ok("Got " + message)
    }
    Definition Classes
    RequestMethods
  202. implicit def request2session(implicit request: RequestHeader): Session

    Permalink

    Retrieves the session implicitly from the request.

    Retrieves the session implicitly from the request.

    For example:

    def index(name:String) = Action { implicit request =>
      val username = request2session("username")
      Ok("Hello " + username)
    }
    Definition Classes
    RequestMethods
  203. val standardDateParserWithoutTZ: DateTimeFormatter

    Permalink
  204. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  205. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  206. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  207. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  208. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  209. def withCharset(mimeType: String)(implicit codec: Codec): String

    Permalink

    returns

    the codec charset appended to mimeType

    Definition Classes
    ContentTypes

Deprecated Value Members

  1. val TOO_MANY_REQUEST: Int

    Permalink
    Definition Classes
    Status
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use TOO_MANY_REQUESTS instead

  2. val TooManyRequest: Status

    Permalink

    Generates a ‘429 TOO_MANY_REQUEST’ result.

    Generates a ‘429 TOO_MANY_REQUEST’ result.

    Definition Classes
    Results
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Use TooManyRequests instead

  3. def at(path: String, file: String, aggressiveCaching: Boolean): Action[AnyContent]

    Permalink

    Generates an Action that serves a static resource.

    Generates an Action that serves a static resource.

    path

    the root folder for searching the static resource files, such as "/public". Not URL encoded.

    file

    the file part extracted from the URL. May be URL encoded (note that %2F decodes to literal /).

    aggressiveCaching

    if true then an aggressive set of caching directives will be used. Defaults to false.

    Definition Classes
    AssetsAssetsBuilder
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Inject Assets and use Assets#at

  4. def at(file: String): Action[AnyContent]

    Permalink

    Generates an Action that serves a static resource, using the base asset path from configuration.

    Generates an Action that serves a static resource, using the base asset path from configuration.

    Definition Classes
    AssetsAssetsBuilder
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Inject Assets and use Assets#at

  5. implicit def request2lang(implicit request: RequestHeader): Lang

    Permalink

    Retrieve the language implicitly from the request.

    Retrieve the language implicitly from the request.

    For example:

    def index(name:String) = Action { implicit request =>
      val lang: Lang = request2lang
      Ok("Got " + lang)
    }
    Definition Classes
    RequestMethods
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) See https://www.playframework.com/documentation/2.6.x/MessagesMigration26

  6. def versioned(path: String, file: Asset): Action[AnyContent]

    Permalink

    Generates an Action that serves a versioned static resource.

    Generates an Action that serves a versioned static resource.

    Definition Classes
    AssetsAssetsBuilder
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Inject Assets and use Assets#versioned

  7. def versioned(file: String): Action[AnyContent]

    Permalink

    Generates an Action that serves a versioned static resource, using the base asset path from configuration.

    Generates an Action that serves a versioned static resource, using the base asset path from configuration.

    Definition Classes
    AssetsAssetsBuilder
    Annotations
    @deprecated
    Deprecated

    (Since version 2.6.0) Inject Assets and use Assets#versioned

Inherited from AssetsBuilder

Inherited from BaseController

Inherited from RequestMethods

Inherited from Rendering

Inherited from RequestExtractors

Inherited from AcceptExtractors

Inherited from ContentTypes

Inherited from HeaderNames

Inherited from play.api.http.Status

Inherited from HttpProtocol

Inherited from Results

Inherited from AnyRef

Inherited from Any

Ungrouped