Package com.dotcms.repackage.org.apache.felix.http.api

Examples of com.dotcms.repackage.org.apache.felix.http.api.ExtHttpService


        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" );
        }
View Full Code Here


        //Service reference to ExtHttpService that will allows to register servlets and filters
        ServiceReference sRef = context.getServiceReference( ExtHttpService.class.getName() );
        if ( sRef != null ) {

            ExtHttpService httpService = (ExtHttpService) context.getService( sRef );
            try {
                //Registering a simple test servlet
                HelloWorldServlet simpleServlet = new HelloWorldServlet();
                httpService.registerServlet( "/helloworld", simpleServlet, null, null );

                CMSFilter.addExclude( "/app/helloworld" );
            } catch ( Exception e ) {
                e.printStackTrace();
            }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.felix.http.api.ExtHttpService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.