I have two listeners in DD as - The constructor of TestContextListener throws Runtime exception, and tomcat container displays error as -
SEVERE: Error configuring application listener of class foo.TestServlet
java.lang.RuntimeException: TestContextListener constructor intentional exception thrown by me
SEVERE: Skipped installing application listeners due to previous error(s)
Same things happens when two or more servlets are configured, and first of them blow the constructor,
i cannot see rest of servlets loaded.
Please guide me, where i can get rules which are related to DD about above concept. (e.g. if first
element of DD does not load, rest of them of the same type also does not get loaded)
So where can i find list of rules for DD, in case some element of the DD does not loaded due to exception or other reason. Looks like when one type of element at first order is not loaded and instantiated, rest of the same type does not load and instantiate. Is it the rule?
I think the code posted above was not required, and it was not to the point question. Please let me simplify the question. My question is ,"Is it correct, on startup of tomcat, If one element(e.g. listener or servlet or jsp") of DD throws exception during construction or initialization, rest of elements are not loaded at all"? . I have experienced this, but do not know exact rules about how it works. Can you give some guidance about rules for DD?