Source

rest-assured-samples / src / main / webapp / WEB-INF / web.xml

The default branch has multiple heads

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
        <servlet-name>Jersey REST Servlet</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.hascode.ra_samples</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey REST Servlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
    
    <welcome-file-list>
    	<welcome-file>/index.html</welcome-file>
    </welcome-file-list>
    
    <security-role>
        <role-name>admin</role-name>
    </security-role>
    
    <security-constraint>
        <display-name>MySecurityConstraint</display-name>
        <web-resource-collection>
            <web-resource-name>SecuredRestService</web-resource-name>
            <url-pattern>/service/secure/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>admin</role-name>
        </auth-constraint>
    </security-constraint>
    
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>hasCode.com Secured REST Service</realm-name>
    </login-config>
</web-app>