Examples of ContextHandler


Examples of org.mortbay.jetty.handler.ContextHandler

    {
        super(arg0);
        server.setConnectors(new Connector[]
        { connector });

        ContextHandler vcontext=new ContextHandler();
        vcontext.setContextPath("/");
        vcontext.setVirtualHosts(new String[]
        { "VirtualHost" });
        vcontext.setHandler(new DumpHandler("Virtual Dump"));

        ContextHandler context=new ContextHandler();
        context.setContextPath("/");
        context.setHandler(new DumpHandler());

        HandlerCollection collection=new HandlerCollection();
        collection.setHandlers(new Handler[]
        { vcontext, context });
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandler

    private void checkIfContextIsFree(String path)
    {
        Handler[] handlers = _contextCollection.getChildHandlersByClass(ContextHandler.class);
        for (int i = 0; handlers!= null && i < handlers.length; i++)
        {
            ContextHandler ctx = (ContextHandler) handlers[i];
            if (ctx.getContextPath().equals(path))
                throw new IllegalArgumentException("another context already bound to path " + path)
        }
    }
View Full Code Here

Examples of org.mortbay.jetty.handler.ContextHandler

    {
        Handler handler = null;
        Handler[] handlers = _contextCollection.getChildHandlersByClass(ContextHandler.class);
        for (int i = 0; handlers!= null && i < handlers.length && handler == null; i++)
        {
            ContextHandler ctx = (ContextHandler) handlers[i];
            if (ctx.getContextPath().equals(path))
                handler = ctx;
        }
        if (handler != null)
            _contextCollection.removeHandler(handler);
    }
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.