File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
servlet/security-annotated/src
test/java/org/javaee7/servlet/security/annotated Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <web-app xmlns =" http://xmlns.jcp.org/xml/ns/javaee" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3+ xsi : schemaLocation =" http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
4+ version =" 3.1" >
5+
6+ <login-config >
7+ <auth-method >BASIC</auth-method >
8+ <realm-name >file</realm-name >
9+ </login-config >
10+
11+ </web-app >
Original file line number Diff line number Diff line change 77import static org .junit .Assert .assertNotNull ;
88import static org .junit .Assert .fail ;
99
10+ import java .io .File ;
1011import java .net .URL ;
1112
1213import org .jboss .arquillian .container .test .api .Deployment ;
2930 */
3031@ RunWith (Arquillian .class )
3132public class SecureServletTest {
33+
34+ private static final String WEBAPP_SRC = "src/main/webapp" ;
3235
3336 @ ArquillianResource
3437 private URL base ;
@@ -43,7 +46,8 @@ public static WebArchive createDeployment() {
4346 addUsersToContainerIdentityStore ();
4447
4548 return create (WebArchive .class )
46- .addClass (SecureServlet .class );
49+ .addClass (SecureServlet .class )
50+ .addAsWebInfResource ((new File (WEBAPP_SRC + "/WEB-INF" , "web.xml" )));
4751 }
4852
4953 @ Before
You can’t perform that action at this time.
0 commit comments