The Request Object

The Request object is the one who has been pruned the most from the Cocoon Environment. The sections that were pruned were:

  • URI handling
  • Session handling

NOTE(SM/RR): Session handling has been removed in favor of the cocoon object and URI handling has been removed because unnecessary. I'm aware this is a big statement, please see below of why this is so.

---- methods ----

attributes

  • get(name)
  • getAttribute(name)
  • getAttributeNames()
  • setAttribute(name,value)
  • removeAttribute(name)

encoding

  • getCharacterEncoding()
  • setCharacterEncoding(encoding)

payload

  • getContentLength()
  • getContentType()

parameters

  • getParameter(name)
  • getParameterValues(name)
  • getParameterNames()

transport

  • getAuthType()
  • getProtocol()
  • getScheme()
  • getMethod()
  • getServerName()
  • getServerPort()
  • getRemoteAddr()
  • getRemoteHost()
  • isSecure()

locale

  • getLocale()
  • getLocales()

cookies

  • getCookies()

headers

  • getHeader()
  • getHeaders()
  • getHeadersNames()

authentication

  • getRemoteUser()
  • getUserPrincipal()
  • isUserInRole(role)

---- properties ----

[name] -> maps to the parameter indicates with the name

For example request.blah is equivalent to request.getParameter("blah")

  • No labels