c

org.scalatra.servlet

RichServletContext

case class RichServletContext(sc: ServletContext) extends AttributesMap with Product with Serializable

Extension methods to the standard ServletContext.

Linear Supertypes
Serializable, Product, Equals, AttributesMap, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichServletContext
  2. Serializable
  3. Product
  4. Equals
  5. AttributesMap
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RichServletContext(sc: ServletContext)

Type Members

  1. type A = ServletContext
    Attributes
    protected[this]
    Definition Classes
    RichServletContextAttributesMap

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +=(kv: (String, Any)): RichServletContext.this.type

    Sets an attribute on the underlying servlet object.

    Sets an attribute on the underlying servlet object.

    kv

    the key/value pair. If the value is null, has the same effect as calling -=(kv._1).

    returns

    the map itself

    Definition Classes
    AttributesMap
  4. def -=(key: String): RichServletContext.this.type

    Removes an attribute from the underlying servlet object.

    Removes an attribute from the underlying servlet object.

    key

    the key to remove

    returns

    the map itself

    Definition Classes
    AttributesMap
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def apply(key: String): Any

    Returns the attribute associated with the key or throw an exception when nothing found

    Returns the attribute associated with the key or throw an exception when nothing found

    key

    The key to find

    returns

    an value for the attributed associated with the key in the underlying servlet object, or throw an exception if the key doesn't exist

    Definition Classes
    AttributesMap
  7. def as[T](key: String)(implicit converter: TypeConverter[Any, T]): T

    Returns the attribute associated with the key or throw an exception when nothing found

    Returns the attribute associated with the key or throw an exception when nothing found

    T

    The type of the value

    key

    The key to find

    returns

    an value for the attributed associated with the key in the underlying servlet object, or throw an exception if the key doesn't exist

    Definition Classes
    AttributesMap
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def attributes: ServletContext
    Attributes
    protected[this]
    Definition Classes
    RichServletContextAttributesMap
  10. def attributesTypeClass: Attributes[A]
    Attributes
    protected[this]
    Definition Classes
    RichServletContextAttributesMap
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. def contains(key: String): Boolean

    Returns whether the specified key exists

    Returns whether the specified key exists

    returns

    whether the specified key exists

    Definition Classes
    AttributesMap
  13. def contextPath: String
  14. def dumpAll: String

    dumps all keys and values

    dumps all keys and values

    Definition Classes
    AttributesMap
  15. def environment: String

    A free form string representing the environment.

    A free form string representing the environment. org.scalatra.Environment is looked up as a system property, and if absent, as an init parameter. The default value is DEVELOPMENT.

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def foreach[U](f: ((String, Any)) => U): Unit

    Applies a function f to add attribute elements

    Applies a function f to add attribute elements

    Definition Classes
    AttributesMap
  19. def get(key: String): Option[Any]

    Optionally returns the attribute associated with the key

    Optionally returns the attribute associated with the key

    key

    The key to find

    returns

    an option value containing the attribute associated with the key in the underlying servlet object, or None if none exists.

    Definition Classes
    AttributesMap
  20. def getAs[T](key: String)(implicit converter: TypeConverter[Any, T]): Option[T]

    Optionally returns and type cast the attribute associated with the key

    Optionally returns and type cast the attribute associated with the key

    T

    The type of the value

    key

    The key to find

    returns

    an option value containing the attributed associated with the key in the underlying servlet object, or None if none exists

    Definition Classes
    AttributesMap
  21. def getAsOrElse[T](key: String, default: => T)(implicit converter: TypeConverter[Any, T]): T

    Returns the attribute associated with the key or default value

    Returns the attribute associated with the key or default value

    T

    The type of the value

    key

    The key to find

    default

    The default value, it will be returned when the key does not exist

    returns

    an value for the attributed associated with the key in the underlying servlet object, or the default value if the key doesn't exist

    Definition Classes
    AttributesMap
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getOrElse(key: String, default: => Any): Any

    Returns the attribute associated with the key or default value

    Returns the attribute associated with the key or default value

    key

    The key to find

    default

    The default value, it will be returned when the key does not exist

    returns

    an value for the attributed associated with the key in the underlying servlet object, or the default value if the key doesn't exist

    Definition Classes
    AttributesMap
  24. def getOrElseUpdate(key: String, value: => Any): Any

    Returns the attribute associated with the key or update attributes with the specified value

    Returns the attribute associated with the key or update attributes with the specified value

    key

    The key to find

    value

    The value that will be updated the attribute associated with the key when the key does not exist

    returns

    an value for the attributed associated with the key in the underlying servlet object, or the updated value if the key doesn't exist

    Definition Classes
    AttributesMap
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def iterator: Iterator[(String, Any)]

    Creates a new iterator over all attributes in the underlying servlet object.

    Creates a new iterator over all attributes in the underlying servlet object.

    returns

    the new iterator

    Definition Classes
    AttributesMap
  27. def keys: Iterator[String]

    Returns an attributes keys

    Returns an attributes keys

    Definition Classes
    AttributesMap
  28. def mount[T](handlerClass: Class[T], urlPattern: String, loadOnStartup: Int): Unit
  29. def mount[T](handlerClass: Class[T], urlPattern: String): Unit
  30. def mount[T](handlerClass: Class[T], urlPattern: String, name: String, loadOnStartup: Int = 1): Unit
  31. def mount(handler: Handler, urlPattern: String, loadOnStartup: Int): Unit
  32. def mount(handler: Handler, urlPattern: String): Unit
  33. def mount(handler: Handler, urlPattern: String, name: String, loadOnStartup: Int): Unit

    Mounts a handler to the servlet context.

    Mounts a handler to the servlet context. Must be an HttpServlet or a Filter.

    handler

    the handler to mount

    urlPattern

    the URL pattern to mount. Will be appended with \/\* if not already, as path-mapping is the most natural fit for Scalatra. If you don't want path mapping, use the native Servlet API.

    name

    the name of the handler

  34. def mount(handler: Handler, urlPattern: String, name: String): Unit

    Mounts a handler to the servlet context.

    Mounts a handler to the servlet context. Must be an HttpServlet or a Filter.

    handler

    the handler to mount

    urlPattern

    the URL pattern to mount. Will be appended with \/\* if not already, as path-mapping is the most natural fit for Scalatra. If you don't want path mapping, use the native Servlet API.

    name

    the name of the handler

  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. def productElementNames: Iterator[String]
    Definition Classes
    Product
  39. def resource(req: HttpServletRequest): Option[URL]

    Optionally returns the resource mapped to the request's path.

    Optionally returns the resource mapped to the request's path.

    req

    the request

    returns

    the resource located at the result of concatenating the request's servlet path and its path info, or None if there is no resource at that path.

  40. def resource(path: String): Option[URL]

    Optionally returns a URL to the resource mapped to the given path.

    Optionally returns a URL to the resource mapped to the given path. This is a wrapper around getResource.

    path

    the path to the resource

    returns

    the resource located at the path, or None if there is no resource at that path.

  41. val sc: ServletContext
  42. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  43. def update(key: String, value: Any): Unit

    Updates the attribute associated with the key

    Updates the attribute associated with the key

    key

    The key to update

    value

    The value to update

    Definition Classes
    AttributesMap
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AttributesMap

Inherited from AnyRef

Inherited from Any

Ungrouped