Package org.directwebremoting.servlet

Examples of org.directwebremoting.servlet.DwrServlet


        // Set the location and server
        this.location = "http://" + servername + ":" + port;
        this.server = new Server(port);

        final Context context = new Context(this.server, "/", Context.SESSIONS);
        final DwrServlet servlet = new DwrServlet();
        final ServletHolder servletholder = new ServletHolder(servlet);

        servletholder.setInitParameter("debug", "true");
        servletholder.setInitParameter("activeReverseAjaxEnabled", "true");
        servletholder.setInitParameter("initApplicationScopeCreatorsAtStartup", "true");
        servletholder.setInitParameter("jsonRpcEnabled", "true");
        servletholder.setInitParameter("jsonpEnabled", "true");
        servletholder.setInitParameter("preferDataUrlSchema", "false");
        servletholder.setInitParameter("maxWaitAfterWrite", "-1");
        servletholder.setInitParameter("jsonpEnabled", "true");
        servletholder.setInitParameter("allowScriptTagRemoting", "true");
        servletholder.setInitParameter("crossDomainSessionSecurity", "false");
        servletholder.setInitParameter("overridePath", this.location);
        servletholder.setInitParameter("allowGetForSafariButMakeForgeryEasier", "true");

        context.addServlet(servletholder, "/*");

        try {
            this.server.start();
        } catch (final Exception e) {
            e.printStackTrace();
        }
        this.creatorManager = servlet.getContainer().getBean(CreatorManager.class);
        this.converterManager = servlet.getContainer().getBean(ConverterManager.class);
    }
View Full Code Here

TOP

Related Classes of org.directwebremoting.servlet.DwrServlet

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.