简体   繁体   中英

Configure a tomcat session manager to ignore particular requests

I'm trying to configure a context.xml such that my custom AWS DynamoDB session manager doesn't attempt to create sessions for particular requests (eg mobile ones).

This seems like a natural enough role for a Valve entity. The valve listens for particular requests and sets some state that signals action or inaction to the rest of the session management system. However, I can't figure out where that state ought to be. Is there a consensus right way to do this?

Your need to find the place in your own application where the sessions are being created, and stop them from being created there . Unless you are using FORM authentication, Tomcat will never create a session for a request unless your application specifically calls HttpServletRequest.getSession(true) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM