if ( sRef != null ) {
//Publish bundle services
publishBundleServices( context );//This call will make the elements of the bundle, like our controller class available to the Spring context
ExtHttpService httpService = (ExtHttpService) context.getService( sRef );
try {
DispatcherServlet dispatcherServlet = new DispatcherServlet();
dispatcherServlet.setContextConfigLocation( "spring/example-servlet.xml" );
httpService.registerServlet( "/spring", dispatcherServlet, null, null );
} catch ( Exception e ) {
e.printStackTrace();
}
CMSFilter.addExclude( "/app/spring" );
}