DOC

header

By Aaron Bailey,2014-10-09 10:20
10 views 0
header

取得HTTP请求头部中的取值.语法与<bean:cookie>相同, 其返回

    值为字符串或字符串数组(在指定multiple属性的情况下).

    <bean:header id="accept" name="Accept-Language"/>

    <%= accept %>

    Retrieve the value of the specified request header (as a single value or multiple values, depending on the multiple attribute), and define the result as a page scope attribute of type String (if multiple is not

    specified) or String[] (if multiple is specified).

    If no header with the specified name can be located, and no default value is specified, a request time exception will be thrown.

    Attribute Description Name

    Specifies the name of the scripting variable (and

    associated page scope attribute) that will be made

    available with the value of the specified request id header.

    (REQUIRED) (RT EXPR)

    If any arbitrary value for this attribute is

    specified, causes a call to

    HttpServletRequest.getHeaders() and a definition of

    the result as a bean of type String[]. Otherwise,

    multiple HttpServletRequest.getHeader() will be called, and

    a definition of the result as a bean of type String

    will be performed.

    (RT EXPR)

    Specifies the name of the request header whose

    value, or values, is to be retrieved. name

    (REQUIRED) (RT EXPR)

    The default header value to return if no header value with the specified name was included in this

request.

(RT EXPR)

Report this document

For any questions or suggestions please email
cust-service@docsford.com