-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Build up of ConstraintMappings when stopping and starting WebAppContext #5824
Comments
@lachlan-roberts did you specify a ConstraintSecurityHandler in a context xml or code equivalent, or did you let jetty create it for you on startup? |
This is applicable for jetty-9.4 as well. ConstraintMappings are never cleared out of the ConstraintSecurityHandler, thus if they were added via a web.xml/web-fragment.xml, annotation or javax.servlet api call, they will be duplicated when the context restarts. Note that this generally isn't a problem when running in the distro, as the deployer removes the WebAppContext and creates a fresh one when it restarts the webapp. Embedded code or the jetty-maven-plugin would be affected though. The problem seems to have been there since 2012 with the following commit: 1d89bef |
Signed-off-by: Jan Bartel <janb@webtide.com>
Opened PR #5842 |
Signed-off-by: Jan Bartel <janb@webtide.com>
…dler start Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Fixed by PR #5842 |
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Jetty version
10.0.x
Description
After calling
stop()
thenstart()
a bunch of times on aWebAppContext
, I get a build up of constraint mappings.Here is a section of a dump I took showing the
ConstraintMapping
s, I improved thetoString
ofConstraintMapping
in my local code to get extra info on the mappings.The text was updated successfully, but these errors were encountered: