Can I turn off the HttpSession in web.xml?

前端 未结 9 1068
深忆病人
深忆病人 2020-11-27 14:29

I would like to eliminate the HttpSession completely - can I do this in web.xml? I\'m sure there are container specific ways to do it (which is what crowds the search result

9条回答
  •  天命终不由人
    2020-11-27 14:55

    For RESTful application, I simply invalidate it every time the request's lifecycle ends. There may be some web server that always creates new session when new client access whether you call request.getSession() or not.

提交回复
热议问题