*/
public void testCustomErrorPage() throws Exception {
File appDir = new File(getTemporaryDirectory(), "MyApp");
- new File(appDir, "WEB-INF").mkdirs();
+ File webInf = new File(appDir, "WEB-INF");
+ if (!webInf.mkdirs()) {
+ fail("Unable to create directory [" + webInf + "]");
+ }
Writer w = new OutputStreamWriter(new FileOutputStream(new File(appDir,
"WEB-INF/web.xml")), "UTF-8");
try {
*/
public void testCustomErrorPageMissing() throws Exception {
File appDir = new File(getTemporaryDirectory(), "MyApp");
- new File(appDir, "WEB-INF").mkdirs();
+ File webInf = new File(appDir, "WEB-INF");
+ if (!webInf.mkdirs()) {
+ fail("Unable to create directory [" + webInf + "]");
+ }
Writer w = new OutputStreamWriter(new FileOutputStream(new File(appDir,
"WEB-INF/web.xml")), "UTF-8");
try {