BBjJettyContext
Description
In BBj 15.00 and higher, BBjJettyContext stores context specific attributes and parameters that are available to all servlets running within that context.
Creation
BBxServlet > BBxServletContext > BBxWebSession > BBjJettyContext
A BBjCookie object is obtained with the following BBxWebSession method:
Return Value |
Method |
---|---|
BBjJettyContext |
getContext() |
Deprecated Creation
BBjServletEvent > BBjHttpRequest > BBjHttpSession > BBjJettyContext
Return Value |
Method |
---|---|
BBjJettyContext |
BBjHttpSession::getContext() |
BBjJettyContext | BBjspWebSession::getContext() |
Methods of BBjJettyContext
Return Value |
Method |
---|---|
boolean |
contains(string name) |
boolean |
containsAttribute(string name) |
object |
getAttribute(string name) |
string |
|
String |
|
String | getContextPath() |
string |
|
BBjString |
getInitParameter(string name) |
BBjspLogger | getLogger() |
String | getServletMapping() |
void |
removeAttribute(string name) |
void |
setAttribute(string name, Object value) |
Remarks
Parameters are defined with the context in jetty.xml and are read-only. Attributes can be added and removed at runtime. The example below demonstrates the use of all the methods for accessing context -specific data.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.