ServletContainerInitializer is an interface that provides the ability to do some task even before context intializes. It can be used to register servlets/filters. It has annotation @HandleTypes that can tell which class type it can handle.
The class implementing ServletContainerInitializer must be packed in a jar and a file configuing its FQN must be kept in meta-inf/services folder .
check http://piotrnowicki.com/2011/03/using-servlets-3-0-servletcontainerinitializer/SCI.onstartup() will be called before any listener is initialized.
No comments:
Post a Comment