-
Notifications
You must be signed in to change notification settings - Fork 204
/
web.xml.erb
57 lines (53 loc) · 2.03 KB
/
web.xml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!--
<display-name>Uncomment and put name :here: for Tomcat Dashboard</display-name>-->
<%# NOTE: to be renamed to servlet_context_params %>
<%- webxml.context_params.each do |name, value| -%>
<context-param>
<param-name><%= name %></param-name>
<param-value><%= value %></param-value>
</context-param>
<%- end -%>
<%- if webxml.respond_to?(:servlet_filter) -%>
<filter>
<filter-name><%= webxml.servlet_filter_name %></filter-name>
<filter-class><%= webxml.servlet_filter %></filter-class>
<async-supported><%= !! webxml.servlet_filter_async %></async-supported>
</filter>
<filter-mapping>
<filter-name><%= webxml.servlet_filter_name %></filter-name>
<url-pattern><%= webxml.servlet_filter_url_pattern %></url-pattern>
</filter-mapping>
<%- else -%> <%# NOTE: due compatibility when warbler gets downgraded to 2.0.0 %>
<filter>
<filter-name>RackFilter</filter-name>
<filter-class>org.jruby.rack.RackFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>RackFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<%- end -%>
<%- if webxml.respond_to?(:servlet_context_listeners) -%>
<%- webxml.servlet_context_listeners.each do |listener| -%>
<listener>
<listener-class><%= listener %></listener-class>
</listener>
<%- end -%>
<%- else -%> <%# NOTE: due compatibility when warbler gets downgraded to 2.0.0 %>
<listener>
<listener-class><%= webxml.servlet_context_listener %></listener-class>
</listener>
<%- end -%>
<%- [webxml.jndi].flatten.each do |jndi| -%>
<resource-ref>
<res-ref-name><%= jndi %></res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<%- end if webxml.jndi -%>
</web-app>