Module: Trinidad::Lifecycle::WebApp::Shared

Included in:
Default, War
Defined in:
lib/trinidad/lifecycle/web_app/shared.rb

Overview

Shared web application lifecycle hook, does #configure before the context starts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#web_appObject (readonly) Also known as: webapp

Returns the value of attribute web_app.



8
9
10
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 8

def web_app
  @web_app
end

Instance Method Details

#before_start(event) ⇒ Object

See Also:



16
17
18
19
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 16

def before_start(event)
  super
  configure(event.lifecycle)
end

#configure(context) ⇒ Object

Configure the web application before it’s started.



22
23
24
25
26
27
28
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 22

def configure(context)
  adjust_context(context)
  remove_defaults(context)
  configure_default_servlet(context)
  configure_jsp_servlet(context)
  configure_logging(context)
end

#initialize(web_app) ⇒ Object



11
12
13
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 11

def initialize(web_app)
  @web_app = web_app
end