开发者

How can directly get the value of a specified cookie name from the header?

开发者 https://www.devze.com 2023-01-27 21:03 出处:网络
In my jsp page i have put ${header.cookie} and I got this : JSESSIONID=1bxvxsg61zphc; JSESSIONID=385a开发者_如何学运维85a4ad8a3041ee047d586447; treeForm:tree-hi=treeForm:tree:applications; clientL

In my jsp page i have put

${header.cookie}

and I got this :

JSESSIONID=1bxvxsg61zphc; JSESSIONID=385a开发者_如何学运维85a4ad8a3041ee047d586447; treeForm:tree-hi=treeForm:tree:applications; clientLanguage=fr

My question is, how can directly get the value of a specified cookie name without using loop, for example: if i want to get the value of the clientLanguage.


Cookies are available by ${cookie.name}. So:

${cookie.clientLanguage}

See also:

  • Unified Expression Language - Implicit objects


${pageContext.response.locale}

0

精彩评论

暂无评论...
验证码 换一张
取 消