| java.lang.Object org.apache.cocoon.webapps.session.context.RequestSessionContext
RequestSessionContext | final public class RequestSessionContext implements SessionContext(Code) | | A SessionContext which encapsulates the current Request object.
It is not allowed to change this context.
The following paths are valid:
/parameter - lists all parameters, parameter names build the
elements with the value of the first parameter with
this name as text node childs
/parameter/ - one text node containing the value of the first
parameter with this name
/querystring - the querystring with a leading '?' or null (the querystring is only for GET)
/parametervalues - same as /parameter but values are listed as described
below and each value of a parameter is listed.
parameter name
parameter value
...
parameter name
parameter value
If a parameter has more than one value for each value a
block is generated.
This output has the namespace of the CIncludeTransformer
to use it as input for a command.
/attributes - lists all attributes, attribute names build the elements
with the values as childs
/headers - lists all headers, header names build the elements
with the values as text node childs
/cookies -----
/characterEncoding
/contentLength
/contentType
/protocol
/remoteAddress
/remoteHost
/scheme
/serverName
/serverPort
/method
/contextPath
/pathInfo
/pathTranslated
/remoteUser
/requestedSessionId
/requestURI
/servletPath
/isRequestedSessionIdFromCookie
/isRequestedSessionIdFromCookie
/isRequestedSessionIdValid
The following attributes of the servlet api 2.2 are missing:
- getUserPrincipal()
- getLocale()
- getLocales()
- getAuthType()
author: Carsten Ziegeler version: CVS $Id: RequestSessionContext.java 433543 2006-08-22 06:22:54Z crossley $ |
Field Summary | |
protected Logger | logger The logger. |
Method Summary | |
public void | appendXML(String path, DocumentFragment fragment) Append a document fragment is not possible for the request context. | public Object | getAttribute(String key) Get a context attribute. | public Object | getAttribute(String key, Object defaultObject) Get a context attribute. | public String | getName() | public NodeList | getNodeList(String path) Get a copy all the nodes specified by the path. | public String | getParameter(String parameterName) | public DocumentFragment | getParameterAsXML(String parameterName) | public Request | getRequest() | public Node | getSingleNode(String path) Get a copy the first node specified by the path. | public String | getValueOfNode(String path) Get the value of this node. | public DocumentFragment | getXML(String path) | public void | loadXML(String path, SourceParameters parameters) Try to load XML into the context. | public void | removeXML(String path) Removing is not possible for the request context. | public void | saveXML(String path, SourceParameters parameters) Try to save XML from the context. | public void | setAttribute(String key, Object value) Set a context attribute. | public void | setNode(String path, Node node) Set the value of a node. | public void | setValueOfNode(String path, String value) | public void | setXML(String path, DocumentFragment fragment) | public void | setup(String value, String loadResource, String saveResource) | public void | setup(Map objectModel, ServiceManager manager, XPathProcessor processor) | public boolean | streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) Stream the XML directly to the handler. |
logger | protected Logger logger(Code) | | The logger.
|
RequestSessionContext | public RequestSessionContext(Logger logger)(Code) | | |
getName | public String getName()(Code) | | Get the name of the context
|
getParameter | public String getParameter(String parameterName)(Code) | | Get the request parameter as a String
|
getRequest | public Request getRequest()(Code) | | Get the request object
|
getValueOfNode | public String getValueOfNode(String path) throws ProcessingException(Code) | | Get the value of this node. This is similiar to the xsl:value-of
function. If the node does not exist, null is returned.
|
|
|