Package org.eclipse.jetty.servlet

Examples of org.eclipse.jetty.servlet.ServletContextHandler.addLifeCycleListener()


     */
    @Override
    protected void modifyServer(Server server) {
        final ServletContextHandler handler = new ServletContextHandler(null, "/graphaware", ServletContextHandler.SESSIONS);

        handler.addLifeCycleListener(new AbstractLifeCycle.AbstractLifeCycleListener() {
            @Override
            public void lifeCycleStarting(LifeCycle event) {
                try {
                    new WebAppInitializer(getDatabase()).onStartup(handler.getServletContext());
                } catch (ServletException e) {
View Full Code Here


    @Override
    protected void startJetty() {
        HandlerList handlerList;
        ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
        context.setContextPath("/graphaware");
        context.addLifeCycleListener(new JettyStartingListener(context.getServletContext()));

        //If http logging is turned on, the jetty handler is a RequestLogHandler with a different type hierarchy than
        //the HandlerList returned when http logging is off
        if(getJetty().getHandler().getClass().equals(RequestLogHandler.class)) {
            handlerList = (HandlerList)((RequestLogHandler)getJetty().getHandler()).getHandler();
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.