What is the difference between session-timeout and max-age in web.xml?
问题 I am not sure if I understand: <session-config> <session-timeout>30</session-timeout> <!-- 30 minutes! --> <cookie-config> <http-only>true</http-only> <max-age>1800</max-age> <!-- 1800 seconds: 30 minutes! --> </cookie-config> <tracking-mode>COOKIE</tracking-mode> </session-config> Also, is there any way to configure ALL cookies in web.xml? This seems to apply to session cookies only. Do I need a filter for such feature? 回答1: Why do we even need this? Quoting the Servlet 3.0 specification: In