protected List < ServletDefinition > initServlets ( List < ServletDefinition > servletDefinitions ) throws Exception { // Sort the list taking in account the load-on-startup attribute Collections . sort ( servletDefinitions ) ; // Sets the Jawr context at "bundle processing at build time" ThreadLocalJawrContext . setBundleProcessingAtBuildTime ( true ) ; List < ServletDefinition > jawrServletDefinitions = new ArrayList < ServletDefinition > ( ) ; for ( Iterator < ServletDefinition > iterator = servletDefinitions . iterator ( ) ; iterator . hasNext ( ) ; ) { ServletDefinition servletDefinition = ( ServletDefinition ) iterator . next ( ) ; servletDefinition . initServlet ( ) ; if ( servletDefinition . isJawrServletDefinition ( ) ) { jawrServletDefinitions . add ( servletDefinition ) ; } } return jawrServletDefinitions ; }
Initialize the servlets and returns only the list of Jawr servlets