How to check if a session is invalid

前端 未结 3 1909
天命终不由人
天命终不由人 2020-12-13 04:39

How to check if a session is invalid or not? There is no method in the API.

Is it the same as isNew()? And what is the difference if not?

3条回答
  •  忘掉有多难
    2020-12-13 05:14

    For all intents and purposes, yes. However, it will throw an IllegalStateException if called on a session invalidated in the same request-response cycle.

提交回复
热议问题