-
Bug
-
Resolution: Done
-
Major
-
EAP 6.1.0.Alpha (7.2.0.Final)
-
None
web.xml declares post-construct and pre-destroy methods, but are not invoked during the servlet lifecycle.
<post-construct> <lifecycle-callback-class>test.TestServlet</lifecycle-callback-class> <lifecycle-callback-method>ps</lifecycle-callback-method> </post-construct> <pre-destroy> <lifecycle-callback-class>test.TestServlet</lifecycle-callback-class> <lifecycle-callback-method>pd</lifecycle-callback-method> </pre-destroy>
The servlet class itself does not contain any @PostConstruct or @PreDestroy methods.
private void ps() { System.out.println("in post-construct declared in web.xml of " + this); } private void pd() { System.out.println("in pre-destroy declared in web.xml of " + this); }