skinny.micro.contrib

FlashMapSupport

trait FlashMapSupport extends Handler with ServletContextAccessor with SkinnyContextInitializer with UnstableAccessValidationConfig with ServletApiImplicits with SessionImplicits

Allows an action to set key-value pairs in a transient state that is accessible only to the next action and is expired immediately after that. This is especially useful when using the POST-REDIRECT-GET pattern to trace the result of an operation.

post("/article/create") {
  // create session
  flash("notice") = "article created succesfully"
  redirect("/home")
}
get("/home") {
  // this will access the value set in previous action
  stuff_with(flash("notice"))
}
See also

FlashMap

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FlashMapSupport
  2. SessionImplicits
  3. Handler
  4. LoggerProvider
  5. ServletContextAccessor
  6. RicherStringImplicits
  7. ServletApiImplicits
  8. RouteRegistryAccessor
  9. UnstableAccessValidationConfig
  10. SkinnyContextInitializer
  11. Initializable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Config extends AnyRef

    Definition Classes
    Initializable
  2. abstract type ConfigT <: AnyRef { ... /* 3 definitions in type refinement */ }

    Definition Classes
    ServletContextAccessorInitializable

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. var config: ConfigT

    The configuration, typically a ServletConfig or FilterConfig.

    The configuration, typically a ServletConfig or FilterConfig.

    Definition Classes
    ServletContextAccessor
  9. implicit def configWrapper(config: ConfigT): Config { object initParameters }

    Attributes
    protected
    Definition Classes
    ServletContextAccessorInitializable
  10. def context: SkinnyContext

    Definition Classes
    SkinnyContextInitializer
  11. def contextPath: String

    Definition Classes
    ServletContextAccessor
  12. implicit def enrichRequest(request: HttpServletRequest): RichRequest

    Definition Classes
    ServletApiImplicits
  13. implicit def enrichResponse(response: HttpServletResponse): RichResponse

    Definition Classes
    ServletApiImplicits
  14. implicit def enrichServletContext(servletContext: ServletContext): RichServletContext

    Definition Classes
    ServletApiImplicits
  15. implicit def enrichSession(session: HttpSession): RichHttpServletSession

    Definition Classes
    ServletApiImplicits
  16. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def flash(key: String)(implicit ctx: SkinnyContext): Any

  20. def flash(implicit ctx: SkinnyContext): FlashMap

    Returns the FlashMap instance for the current request.

  21. def flashMapSetSession(f: FlashMap)(implicit ctx: SkinnyContext): Unit

    Override to implement custom session retriever, or sanity checks if session is still active

    Override to implement custom session retriever, or sanity checks if session is still active

    f

  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def handle(req: HttpServletRequest, res: HttpServletResponse): Unit

    Handles a request and writes to the response.

    Handles a request and writes to the response.

    Definition Classes
    FlashMapSupportHandler
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. def initParameter(name: String): Option[String]

    Gets an init parameter from the config.

    Gets an init parameter from the config.

    name

    the name of the key

    returns

    an option containing the value of the parameter if defined, or None if the parameter is not set.

    Definition Classes
    ServletContextAccessor
  26. def initialize(config: ConfigT): Unit

    Initializes the kernel.

    Initializes the kernel. Used to provide context that is unavailable when the instance is constructed, for example the servlet lifecycle. Should set the config variable to the parameter.

    config

    the configuration.

    Definition Classes
    ServletContextAccessorInitializable
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def logger: Logger

    Attributes
    protected
    Definition Classes
    LoggerProvider
  29. def loggerName: String

    Attributes
    protected
    Definition Classes
    LoggerProvider
  30. def mount(ctx: ServletContext): Unit

    Definition Classes
    Handler
  31. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. def request(implicit ctx: SkinnyContext): HttpServletRequest

    Definition Classes
    SkinnyContextInitializer
  35. def respondTo: Seq[Format]

    Defines formats to be respond.

    Defines formats to be respond. By default, HTML, JSON, XML are available.

    returns

    formats

    Attributes
    protected
    Definition Classes
    Handler
  36. def response(implicit ctx: SkinnyContext): HttpServletResponse

    Definition Classes
    SkinnyContextInitializer
  37. val routes: RouteRegistry

    The routes registered in this kernel.

    The routes registered in this kernel.

    Attributes
    protected
    Definition Classes
    RouteRegistryAccessor
  38. def serverAuthority(implicit ctx: SkinnyContext): String

    Attributes
    protected
    Definition Classes
    ServletContextAccessor
  39. def serverHost(implicit ctx: SkinnyContext): String

    Definition Classes
    ServletContextAccessor
  40. def serverPort(implicit ctx: SkinnyContext): Int

    Definition Classes
    ServletContextAccessor
  41. implicit def servletContext: ServletContext

    The servlet context in which this kernel runs.

    The servlet context in which this kernel runs.

    Definition Classes
    ServletContextAccessor
  42. def session(key: Symbol)(implicit ctx: SkinnyContext): Any

    Definition Classes
    SessionImplicits
  43. def session(key: String)(implicit ctx: SkinnyContext): Any

    Definition Classes
    SessionImplicits
  44. implicit def session(implicit ctx: SkinnyContext): HttpSession

    The current session.

    The current session. Creates a session if none exists.

    Definition Classes
    SessionImplicits
  45. def sessionOption(implicit ctx: SkinnyContext): Option[HttpSession]

    The current session.

    The current session. If none exists, None is returned.

    Definition Classes
    SessionImplicits
  46. def shutdown(): Unit

    A hook to shutdown the class.

    A hook to shutdown the class. Bridges the gap between servlet's destroy and filter's destroy.

    Attributes
    protected
    Definition Classes
    Initializable
  47. def skinnyContext(implicit ctx: ServletContext): SkinnyContext

    Skinny Micro Context

    Skinny Micro Context

    Definition Classes
    SkinnyContextInitializer
  48. implicit def stringToRicherString(s: String): RicherString

    Definition Classes
    RicherStringImplicits
  49. def sweepUnusedFlashEntries(req: HttpServletRequest): Boolean

    Determines whether unused flash entries should be swept.

    Determines whether unused flash entries should be swept. The default is false.

    Attributes
    protected
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def unstableAccessValidationEnabled: Boolean

    Enables unstable access validation.

    Enables unstable access validation.

    Attributes
    protected
    Definition Classes
    UnstableAccessValidationConfig
  53. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def withRequest[A](request: HttpServletRequest)(f: ⇒ A): A

    Executes the block with the given request bound to the request method.

    Executes the block with the given request bound to the request method.

    Attributes
    protected
    Definition Classes
    SkinnyContextInitializer
  57. def withRequestResponse[A](request: HttpServletRequest, response: HttpServletResponse)(f: ⇒ A): A

    Attributes
    protected
    Definition Classes
    SkinnyContextInitializer
  58. def withResponse[A](response: HttpServletResponse)(f: ⇒ A): A

    Executes the block with the given response bound to the response method.

    Executes the block with the given response bound to the response method.

    Attributes
    protected
    Definition Classes
    SkinnyContextInitializer

Inherited from SessionImplicits

Inherited from Handler

Inherited from LoggerProvider

Inherited from ServletContextAccessor

Inherited from RicherStringImplicits

Inherited from ServletApiImplicits

Inherited from RouteRegistryAccessor

Inherited from SkinnyContextInitializer

Inherited from Initializable

Inherited from AnyRef

Inherited from Any

Ungrouped