Skip to content

Commit

Permalink
Issue #5360 Ensure @WebListeners have origin attr in quickstart-web.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bartel <[email protected]>
  • Loading branch information
janbartel committed Sep 29, 2020
1 parent 1904903 commit dc7b693
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javax.servlet.ServletContextListener;
import javax.servlet.ServletRequestAttributeListener;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionIdListener;
import javax.servlet.http.HttpSessionListener;
Expand Down Expand Up @@ -84,6 +85,7 @@ public void apply()
ListenerHolder h = _context.getServletHandler().newListenerHolder(new Source(Source.Origin.ANNOTATION, clazz.getName()));
h.setHeldClass(clazz);
_context.getServletHandler().addListener(h);
metaData.setOrigin(clazz.getName() + ".listener", clazz.getAnnotation(WebListener.class), clazz);
}
}
else
Expand Down

0 comments on commit dc7b693

Please sign in to comment.