RequestUtil
@Deprecated
public class RequestUtil
extends java.lang.Object
Constructor and Description |
---|
RequestUtil()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getServletName(javax.servlet.Servlet servlet)
Deprecated.
Utility method to return a name for the given servlet.
|
static java.util.Map<java.lang.String,java.lang.Double> |
parserAcceptHeader(java.lang.String value)
Deprecated.
Parses an
Accept-* header of the form: |
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
parserHeader(java.lang.String value)
Deprecated.
Parses a header of the form:
|
static java.lang.Object |
setRequestAttribute(javax.servlet.http.HttpServletRequest request,
java.lang.String name,
java.lang.Object value)
Deprecated.
Sets the named request attribute to the new value and returns the
previous value.
|
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> parserHeader(java.lang.String value)
Header = Token { "," Token } . Token = name { ";" Parameter } . Paramter = name [ "=" value ] ."," and ";" are not allowed within name and value
value
- The header value to parsepublic static java.util.Map<java.lang.String,java.lang.Double> parserAcceptHeader(java.lang.String value)
Accept-*
header of the form:
Header = Token { "," Token } . Token = name { ";" "q" [ "=" value ] } . Paramter = ."," and ";" are not allowed within name and value
value
- The header value to parseDouble
instances providing the value of the
q
parameter.public static java.lang.String getServletName(javax.servlet.Servlet servlet)
null
,
non-empty name:
servlet
- The servlet instancepublic static java.lang.Object setRequestAttribute(javax.servlet.http.HttpServletRequest request, java.lang.String name, java.lang.Object value)
request
- The request object whose attribute is to be set.name
- The name of the attribute to be set.value
- The new value of the attribute. If this is null
the attribute is actually removed from the request.null
if it was not set.Copyright © 2018 The Apache Software Foundation. All rights reserved.