Package org.jruby.rack.servlet

Examples of org.jruby.rack.servlet.ServletRackContext


        navigator = new RubyKlassNavigator(ruby.getProvider().getRuntime(),getWrapper().classLoader);

        initRubyLoadPaths();
        initRubyNativePlugin();

        rackContext = new ServletRackContext(new ServletRackConfig(Jenkins.getInstance().servletContext));
  }
View Full Code Here


            System.out.println("setup rails application via jruby-rack - started . . .");
            ServletContext ctx = config.getServletContext();
            ServletRackConfig rackConfig = new RestyServletRackConfig(ctx);
            final RackApplicationFactory fac = new SharedRackApplicationFactory(new RailsRackApplicationFactory());
            ctx.setAttribute(RackApplicationFactory.FACTORY, fac);
            ServletRackContext rackContext = new ServletRackContext(rackConfig);
            ctx.setAttribute(RackApplicationFactory.RACK_CONTEXT, rackContext);
            try {
                fac.init(rackContext);
                System.out.println("setup rails application via jruby-rack - done . . .");
            } catch (Exception ex) {
View Full Code Here

    public void contextInitialized(final ServletContextEvent event) {
        final ServletContext context = event.getServletContext();
        final ServletRackConfig config = new ServletRackConfig(context);
        final RackApplicationFactory factory = newApplicationFactory(config);
        context.setAttribute(RackApplicationFactory.FACTORY, factory);
        final ServletRackContext rackContext = new DefaultServletRackContext(config);
        context.setAttribute(RackApplicationFactory.RACK_CONTEXT, rackContext);
        try {
            factory.init(rackContext);
        }
        catch (RuntimeException e) {
View Full Code Here

        }
        return httpRequest;
    }

    private boolean resourceExists(final String path) {
        ServletRackContext servletContext = (ServletRackContext) getContext();
        try {
            return servletContext.getResource(path) != null;
        } catch (MalformedURLException e) {
            return false;
        }
    }
View Full Code Here

TOP

Related Classes of org.jruby.rack.servlet.ServletRackContext

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.