Package org.glassfish.grizzly.servlet

Examples of org.glassfish.grizzly.servlet.ServletHandler.addInitParameter()


            for(String contextParamName : contextParams.keySet()) {
                handler.addContextParameter(contextParamName, contextParams.get(contextParamName));
            }

            for(String initParamName : initParams.keySet()) {
                handler.addInitParameter(initParamName, initParams.get(initParamName));
            }

            if(contextPath != null && contextPath.length() > 0) {
                if( !contextPath.startsWith("/") ) {
                    handler.setContextPath("/" + contextPath);
View Full Code Here


    protected static void startServer() {

        // add Jersey resource servlet

        ServletHandler jerseyAdapter = new ServletHandler();
        jerseyAdapter.addInitParameter("com.sun.jersey.config.property.packages",
                "com.sun.jersey.samples.https_grizzly.resource;com.sun.jersey.samples.https_grizzly.auth");
        jerseyAdapter.setContextPath("/");
        jerseyAdapter.setServletInstance(new ServletContainer());

        // add security filter (which handles http basic authentication)
View Full Code Here

        jerseyAdapter.setContextPath("/");
        jerseyAdapter.setServletInstance(new ServletContainer());

        // add security filter (which handles http basic authentication)

        jerseyAdapter.addInitParameter(ResourceConfig.PROPERTY_CONTAINER_REQUEST_FILTERS,
                SecurityFilter.class.getName());

        // Grizzly ssl configuration

        SSLContextConfigurator sslContext = new SSLContextConfigurator();
View Full Code Here

        if (u == null)
            throw new IllegalArgumentException("The URI must not be null");

        final ServletHandler handler = new ServletHandler();
        if (initParams == null) {
            handler.addInitParameter(ClasspathResourceConfig.PROPERTY_CLASSPATH,
                     System.getProperty("java.class.path").replace(File.pathSeparatorChar, ';'));
        } else {
            for (Map.Entry<String, String> e : initParams.entrySet()) {
                handler.addInitParameter(e.getKey(), e.getValue());
            }
View Full Code Here

        if (initParams == null) {
            handler.addInitParameter(ClasspathResourceConfig.PROPERTY_CLASSPATH,
                     System.getProperty("java.class.path").replace(File.pathSeparatorChar, ';'));
        } else {
            for (Map.Entry<String, String> e : initParams.entrySet()) {
                handler.addInitParameter(e.getKey(), e.getValue());
            }
        }

        handler.setServletInstance(getInstance(c));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.