Cookie getMaxAge

后端 未结 4 2434
南方客
南方客 2021-02-20 01:28

I can\'t retrieve cookie maxage it always returns -1

Creating cookie:

Cookie securityCookie = new Cookie(\"sec\", \"somevalue\");
securityCookie.setMaxAg         


        
4条回答
  •  难免孤独
    2021-02-20 02:21

    Just for grins, can you retrieve the value of the cookie from the browser using javascript ?

    Also, can you put a filter before your servlet/jsp so that you can check the value of the cookie after the servlet/jsp sets it ?

提交回复
热议问题