Guys,

Can some of the fine experts on this list double check my assertions below and 
let me know if I'm going wrong anywhere? I hope I got it all right. :-)

Assertion #1
If metadata-complete="true" is present in the deployment descriptor:
A) The container does NOT scan /WEB-INF/classes for annotations,
B) The container does NOT scan /WEB-INF/lib JARs for 
ServletContainerInitializers,
C) The container does NOT scan /WEB-INF/lib JARs for web-fragment.xml files, and
D) The container does NOT scan /WEB-INF/lib JARs for annotations.

Assertion #2
If class loading is configured "parent last," the ServletContainerInitializers 
in the application are fired before ServletContainerInitializers provided by 
the container. If class loading is configured "parent first", the 
ServletContainerInitializers provided by the container fire before the 
ServletContainerInitializers in the application.

Assertion #3
ServletContainerInitializers in the container and in /WEB-INF/lib JARs are 
fired before any ServletContextListeners. The order in which they are fired is 
determined by <absolute-ordering> (web.xml) and/or <order> (web-fragment.xml), 
but if neither of those are present the order is unspecified.

Assertion #4
The init methods of ServletContextListeners declared in the container, in 
/WEB-INF/classes, and in /WEB-INF/lib JARS are all fired BEFORE the init 
methods of any Filters or Servlets. The destroy methods of 
ServletContextListeners declared in the container, in /WEB-INF/classes, and in 
/WEB-INF/lib JARs are all fired AFTER the destroy methods of any Filters or 
Servlets.

Assertion #5
The init methods of Filters declared in the container, in /WEB-INF/classes, and 
in /WEB-INF/lib JARs are all fired BEFORE the init methods of any Servlets. The 
destroy methods of Filters declared in the container, in /WEB-INF/classes, and 
in /WEB-INF/lib JARs are all fired AFTER the destroy methods of any Servlets.

Assertion #6
If any given ServletContainerInitializer is the first 
ServletContainerInitializer to be fired when an application starts up, and that 
ServletContainerInitializer adds a ServletContextListener and a Filter to the 
ServletContext:
A) The Listener it adds will be the first Listener whose init method is called 
and the last Listener whose destroy method is called,
B) The Filter it adds will be the first Filter whose init method is called and 
the last Filter whose destroy method is called, and
C) The Filter will be the first Filter on the Filter chain, always.

Thanks in advance,

Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to