- use default files from yacy.init property "defaultFiles" if no

jetty-configuration is given for default files.
- fix a problem with default paths if no path is given (i.e.
http://localhost:8090 instead of http://localhost:8090/). Without this
patch the path was resolved automatically to http://localhost:8090//
pull/1/head
Michael Peter Christen 11 years ago
parent 77aeb288a2
commit 667a6adddb

@ -142,7 +142,7 @@ public class YaCyDefaultServlet extends HttpServlet {
_mimeTypes = new MimeTypes();
String tmpstr = this.getServletContext().getInitParameter("welcomeFile");
if (tmpstr == null) {
_welcomes = new String[]{"index.html", "welcome.html"}; // set a default welcome file name
_welcomes = HTTPDFileHandler.defaultFiles;
} else {
_welcomes = new String[]{tmpstr,"index.html"};
}
@ -305,7 +305,7 @@ public class YaCyDefaultServlet extends HttpServlet {
} else { // resource is directory
String welcome;
if (!endsWithSlash || (pathInContext.length() == 1)) {
if (!endsWithSlash) {
StringBuffer buf = request.getRequestURL();
synchronized (buf) {
int param = buf.lastIndexOf(";");

@ -73,7 +73,7 @@ public final class HTTPDFileHandler {
private static File htRootPath = null;
public static File htDocsPath = null;
private static String[] defaultFiles = null;
public static String[] defaultFiles = null;
private static File htDefaultPath = null;
private static File htLocalePath = null;
public static String indexForward = "";

Loading…
Cancel
Save