I solved setting an attribute in a ServletContext object in the init method of a servlet. Then I set the loadOnStartup parameter of the @WebServlet annotation to 0 for this servlet and to a value > 0 for the others. What do you think about this solution?