1 <?xml version="1.0" encoding="UTF-8"?>
2 <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
6 <display-name>Hudson</display-name>
7 <description>Build management system</description>
10 <servlet-name>Stapler</servlet-name>
11 <servlet-class>org.kohsuke.stapler.Stapler</servlet-class>
13 <param-name>default-encodings</param-name>
14 <param-value>text/html=UTF-8</param-value>
19 <servlet-name>Stapler</servlet-name>
20 <url-pattern>/</url-pattern>
24 <filter-name>authentication-filter</filter-name>
25 <filter-class>hudson.security.HudsonFilter</filter-class>
29 The Headers filter allows us to to override headers sent by the container
30 that may be in conflict with what we want. For example, Tomcat will set
31 Cache-Control: no-cache for any files behind the security-constraint
32 below. So if Hudson is on a public server, and you want to only allow
33 authorized users to access it, you may want to pay attention to this.
35 See: http://www.nabble.com/No-browser-caching-with-Hudson- -tf4601857.html
38 <filter-name>change-headers-filter</filter-name>
39 <filter-class>hudson.ResponseHeaderFilter</filter-class>
40 <!- The value listed here is for 24 hours. Increase or decrease as you see
41 fit. Value is in seconds. Make sure to keep the public option ->
43 <param-name>Cache-Control</param-name>
44 <param-value>max-age=86400, public</param-value>
46 <!- It turns out that Tomcat just doesn't want to let
47 go of its cache option. If you override Cache-Control,
48 it starts to send Pragma: no-cache as a backup.
51 <param-name>Pragma</param-name>
52 <param-value>public</param-value>
58 <filter-name>authentication-filter</filter-name>
59 <url-pattern>/*</url-pattern>
63 <filter-name>plugins-filter</filter-name>
64 <filter-class>hudson.util.PluginServletFilter</filter-class>
67 <filter-name>plugins-filter</filter-name>
68 <url-pattern>/*</url-pattern>
71 <!-- Uncomment this if you are protecting your entire hudson setup
72 from public view. See note above about the filter.
74 <filter-name>change-headers-filter</filter-name>
75 <!- This path should match the value of:
76 /security-constraint/web-resource-collection/url-pattern
78 <url-pattern>/*</url-pattern>
83 <listener-class>hudson.WebAppMain</listener-class>
87 <!-- admins can add/remove/configure projects -->
88 <role-name>admin</role-name>
92 <web-resource-collection>
93 <web-resource-name>Hudson</web-resource-name>
94 <url-pattern>/loginEntry</url-pattern>
95 <!--http-method>GET</http-method-->
96 </web-resource-collection>
98 <role-name>*</role-name>
100 </security-constraint>
103 <auth-method>FORM</auth-method>
105 <form-login-page>/login</form-login-page>
106 <form-error-page>/loginError</form-error-page>
111 <!-- if specified, this value is used as the Hudson home directory -->
113 <env-entry-name>HUDSON_HOME</env-entry-name>
114 <env-entry-type>java.lang.String</env-entry-type>
115 <env-entry-value>/var/lib/hudson</env-entry-value>