public class Session
extends Object
Constructor and Description |
---|
Session() |
Modifier and Type | Method and Description |
---|---|
static String |
encodeURL(XPathContext context,
String origURL)
Function to encode a URL, adding session ID if necessary.
|
static Value |
getData(XPathContext context,
String name)
Function to get a data from a session variable.
|
static String |
getID()
Function to get the current session's identifier
|
static String |
getString(XPathContext context,
Value value)
Gets a proper string for the value.
|
private static Value |
getValue(XPathContext context,
String str)
Checks if the input string is actually an XML document.
|
static boolean |
isEnabled(XPathContext context)
Checks whether session tracking was enabled in the servlet config
|
static boolean |
noCookie()
Function to detect if cookies are turned off
|
static void |
setData(XPathContext context,
String name,
String value)
Function to put data into a session variable.
|
static void |
setData(XPathContext context,
String name,
Value value)
Function to put structured data into a session variable.
|
public static boolean isEnabled(XPathContext context)
public static Value getData(XPathContext context, String name) throws XPathException
XPathException
public static void setData(XPathContext context, String name, Value value) throws XPathException
XPathException
public static void setData(XPathContext context, String name, String value)
public static String encodeURL(XPathContext context, String origURL)
public static String getID()
public static boolean noCookie()
public static String getString(XPathContext context, Value value) throws XPathException
context
- Context for the evaluationXPathException
private static Value getValue(XPathContext context, String str) throws XPathException
str
- The string to check.XPathException