This content has been marked as final.
Show 1 reply
-
1. Re: How can i get ServletContext before Container fire BeforeBeanDiscovery or AfterTypeDiscovery or AfterBeanDiscovery
mkouba Nov 4, 2015 6:49 AM (in response to heyoulin)I'm sorry this is not supported. You could try to exclude the Weld ServletContainerInitializer from scanning by means of
<absolute-ordering>
(if necessary, i.e. if your container supports the ServletContainerInitializer), then register Weld’s listener manually in theWEB-INF/web.xml
and use a custom ServletContextListener to start Spring (declare it before the Weld'sorg.jboss.weld.environment.servlet.Listener)
. See also Servlet containers.