Class: Trinidad::RackWebApp

Inherits:
WebApp
  • Object
show all
Defined in:
lib/trinidad/web_app.rb

Overview

Rack web application (looks for a “rackup” config.ru file).

Constant Summary

Constants inherited from WebApp

WebApp::DEFAULT_SERVLET_CLASS, WebApp::DEFAULT_SERVLET_NAME, WebApp::JSP_SERVLET_CLASS, WebApp::JSP_SERVLET_NAME, WebApp::RACK_FILTER_CLASS, WebApp::RACK_FILTER_NAME, WebApp::RACK_SERVLET_CLASS, WebApp::RACK_SERVLET_NAME

Instance Attribute Summary

Attributes inherited from WebApp

#config, #default_config

Instance Method Summary collapse

Methods inherited from WebApp

#[], #[]=, #add_context_param, #aliases, #allow_linking, #app_root, #cache_max_size, #cache_object_max_size, #cache_ttl, #caching_allowed?, #class_loader, #class_loader!, #context_manager, #context_name, #context_path, #context_xml, create, #default_deployment_descriptor, #default_servlet, #default_web_xml, #define_lifecycle, #deployment_descriptor, #doc_base, #environment, #extensions, #generate_class_loader, #init_params, #initialize, #java_classes, #java_classes_dir, #java_lib, #java_lib_dir, #jruby_compat_version, #jruby_initial_runtimes, #jruby_max_runtimes, #jruby_min_runtimes, #jruby_runtime_acquire_timeout, #jsp_servlet, #key?, #log, #log_dir, #logging, #monitor, #public_config, #public_dir, #public_root, #rack_listener, #rack_servlet, #reset!, #servlet, #solo?, #threadsafe?, #war?, #web_app_dir, #web_xml, #web_xml_context_param, #web_xml_filter?, #web_xml_listener?, #web_xml_servlet?, #work_dir

Constructor Details

This class inherits a constructor from Trinidad::WebApp

Instance Method Details

#context_listenerObject



662
# File 'lib/trinidad/web_app.rb', line 662

def context_listener; 'org.jruby.rack.RackServletContextListener'; end

#context_paramsObject



652
653
654
655
656
657
658
659
660
# File 'lib/trinidad/web_app.rb', line 652

def context_params
  add_context_param 'app.root', app_root
  add_context_param 'rack.env', environment
  if rackup = self.rackup
    rackup = File.join(rackup, 'config.ru') if File.directory?(rackup)
    add_context_param 'rackup.path', rackup
  end
  super
end

#web_xml_environmentObject



664
# File 'lib/trinidad/web_app.rb', line 664

def web_xml_environment; web_xml_context_param('rack.env'); end