package to.etc.domui.server;

import org.eclipse.jdt.annotation.NonNull;

import javax.servlet.FilterConfig;
import java.io.File;
import java.net.URL;

public class FilterConfigParameters implements ConfigParameters {
	@NonNull
	private FilterConfig m_fc;

	@NonNull
	private File m_webFileRoot;

	public FilterConfigParameters(@NonNull FilterConfig fc, @NonNull File webFileRoot) {
		m_fc = fc;
		m_webFileRoot = webFileRoot;
	}

	@Override
	public String getString(@NonNull String name) {
		return m_fc.getInitParameter(name);
	}

	@NonNull
	@Override
	public File getWebFileRoot() {
		return m_webFileRoot;
	}

	@NonNull
	@Override
	public URL getResourcePath(@NonNull String path) throws Exception {
		URL url = m_fc.getServletContext().getResource(path);
		return url;
	}
}

@@ -703,17 +703,42 @@
 %7B%0A%09%09
-URL url =
+if(path.startsWith(%22/%22))%0A%09%09%09return
  m_f
@@ -791,12 +791,119 @@
 urn 
-url;
+m_fc.getServletContext().getResource(%22/%22 + path);%09%09// Always nice to have a relative path start with /. Morons.
 %0A%09%7D%0A

Make sure the relative path passed to getResource() starts with a /, sigh. Very bad design.