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_init(event) ⇒ Object



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

def before_init(event)
  #context = event.lifecycle
  #context.name = context.path if context.name
  super
end

#before_start(event) ⇒ Object

See Also:



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

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

#configure(context) ⇒ Object

Configure the web application before it’s started.



28
29
30
31
32
33
34
# File 'lib/trinidad/lifecycle/web_app/shared.rb', line 28

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