-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServletContext.getSessionTimeout() incorrectly throws IllegalStateException #8556
Comments
Referenced code ... |
This is a curious one, as we pass the Servlet 4.0 TCK. Wonder if this isn't even tested for in the TCK? |
Probably not tested by the TCK… |
bump please :) |
@lprimak thanks for the nudge - don't know how this one escaped my attention. You're right, according to the javadoc you should be able to call |
Jetty version(s)
10.0.11 and newer
Java version/vendor
(use: java -version)
Doesn't matter
OS type/version
Doesn't matter
Description
Jetty throws
IllegalStateException
whenServletContext.getSessionTimeout()
is called from a servlet filter, or a plain servlet.This violates the servlet spec.
See Javadoc: https://javadoc.io/static/javax.servlet/javax.servlet-api/4.0.1/javax/servlet/ServletContext.html#getSessionTimeout--
or the servlet spec.
No exception should be thrown and a valid session timeout (in minutes) should be returned instead.
How to reproduce?
request.getServletContext().getSessionTimeout()
in a servlet filterThe text was updated successfully, but these errors were encountered: