Permalink
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (53 sloc) 2.03 KB
<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>