Commit c973847d authored by Dave Syer's avatar Dave Syer

Revert change that breaks tests in werid way

parent b088f600
...@@ -304,7 +304,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements ...@@ -304,7 +304,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
// Or maybe there is a document root in a well-known location // Or maybe there is a document root in a well-known location
file = file != null ? file : getCommonDocumentRoot(); file = file != null ? file : getCommonDocumentRoot();
if (file == null && this.logger.isWarnEnabled()) { if (file == null && this.logger.isWarnEnabled()) {
this.logger.info("None of the document roots " this.logger.debug("None of the document roots "
+ Arrays.asList(COMMON_DOC_ROOTS) + Arrays.asList(COMMON_DOC_ROOTS)
+ " point to a directory and will be ignored."); + " point to a directory and will be ignored.");
} }
...@@ -340,11 +340,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements ...@@ -340,11 +340,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
} }
private File getWarFileDocumentRoot() { private File getWarFileDocumentRoot() {
File file = getArchiveFileDocumentRoot(".war"); return getArchiveFileDocumentRoot(".war");
if (file != null) {
return file;
}
return getArchiveFileDocumentRoot(".jar");
} }
private File getCommonDocumentRoot() { private File getCommonDocumentRoot() {
......
...@@ -131,12 +131,7 @@ public class JettyEmbeddedServletContainerFactory extends ...@@ -131,12 +131,7 @@ public class JettyEmbeddedServletContainerFactory extends
File root = getValidDocumentRoot(); File root = getValidDocumentRoot();
if (root != null) { if (root != null) {
try { try {
if (!root.isDirectory()) { handler.setBaseResource(Resource.newResource(root));
handler.setBaseResource(Resource.newClassPathResource(""));
}
else {
handler.setBaseResource(Resource.newResource(root));
}
} }
catch (Exception ex) { catch (Exception ex) {
throw new IllegalStateException(ex); throw new IllegalStateException(ex);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment