Check if Cookie exists with JSP EL

前端 未结 4 938
-上瘾入骨i
-上瘾入骨i 2020-12-16 22:59

I am trying to check if a cookie exists on a JSP page using the Expression Language.

I have a cookie called persist which is set to either empty string

4条回答
  •  一整个雨季
    2020-12-16 23:15

    use the cookie map to check that cookie exists or not ${cookie["persist"] == null}

    I hope it works

提交回复
热议问题