jawr-bundle-processor/src/main/java/net/jawr/web/bundle/processor/spring/SpringControllerBundleProcessor.java
/**
	 * Initialize the servlets which will handle the request to the JawrSpringController 
	 * @param servletContext the servlet context
	 * @return the list of servlet definition for the JawrSpringControllers
	 * @throws ServletException if a servlet exception occurs
	 */
Initialize the servlets which will handle the request to the JawrSpringController
@param servletContext the servlet context
@return the list of servlet definition for the JawrSpringControllers
@throws ServletException if a servlet exception occurs
Initialize the servlets which will handle the request to the JawrSpringController @param servletContext the servlet context @return the list of servlet definition for the JawrSpringControllers @throws ServletException if a servlet exception occurs
@SuppressWarnings("rawtypes")
	public List<ServletDefinition> initJawrSpringServlets(ServletContext servletContext) throws ServletException{
		List<ServletDefinition> jawrServletDefinitions = new ArrayList<ServletDefinition>();
		ContextLoader contextLoader = new ContextLoader();
		WebApplicationContext applicationCtx = contextLoader.initWebApplicationContext(servletContext);
		Map<?, ?> jawrControllersMap = applicationCtx.getBeansOfType(JawrSpringController.class);
		Iterator<?> entrySetIterator = jawrControllersMap.entrySet().iterator();
		while(entrySetIterator.hasNext()){
			JawrSpringController jawrController = (JawrSpringController) ((Map.Entry) entrySetIterator.next()).getValue();
			Map<String, Object> initParams = new HashMap<String, Object>();
			initParams.putAll(jawrController.getInitParams());
			ServletConfig servletConfig = new MockServletConfig(SPRING_DISPATCHER_SERVLET,servletContext, initParams);
			MockJawrSpringServlet servlet = new MockJawrSpringServlet(jawrController, servletConfig);
			ServletDefinition servletDefinition = new ServletDefinition(servlet, servletConfig) ;
			jawrServletDefinitions.add(servletDefinition);
		}
		contextLoader.closeWebApplicationContext(servletContext);
		return jawrServletDefinitions;
	}
@ SuppressWarnings ( "rawtypes" ) public List < ServletDefinition > initJawrSpringServlets ( ServletContext servletContext ) throws ServletException { List < ServletDefinition > jawrServletDefinitions = new ArrayList < ServletDefinition > ( ) ; ContextLoader contextLoader = new ContextLoader ( ) ; WebApplicationContext applicationCtx = contextLoader . initWebApplicationContext ( servletContext ) ; Map < ? , ? > jawrControllersMap = applicationCtx . getBeansOfType ( JawrSpringController . class ) ; Iterator < ? > entrySetIterator = jawrControllersMap . entrySet ( ) . iterator ( ) ; while ( entrySetIterator . hasNext ( ) ) { JawrSpringController jawrController = ( JawrSpringController ) ( ( Map . Entry ) entrySetIterator . next ( ) ) . getValue ( ) ; Map < String , Object > initParams = new HashMap < String , Object > ( ) ; initParams . putAll ( jawrController . getInitParams ( ) ) ; ServletConfig servletConfig = new MockServletConfig ( SPRING_DISPATCHER_SERVLET , servletContext , initParams ) ; MockJawrSpringServlet servlet = new MockJawrSpringServlet ( jawrController , servletConfig ) ; ServletDefinition servletDefinition = new ServletDefinition ( servlet , servletConfig ) ; jawrServletDefinitions . add ( servletDefinition ) ; } contextLoader . closeWebApplicationContext ( servletContext ) ; return jawrServletDefinitions ; }
Initialize the servlets which will handle the request to the JawrSpringController
 @param servletContext the servlet context
 @return the list of servlet definition for the JawrSpringControllers
 @throws ServletException if a servlet exception occurs
Initialize the servlets which will handle the request to the JawrSpringController @param servletContext the servlet context @return the list of servlet definition for the JawrSpringControllers @throws ServletException if a servlet exception occurs