486530 - Handler added to WebAppContext prevents ServletContext initialization

+ Adding (commented out) testcase to JstlTest to demonstrate behavior
This commit is contained in:
Joakim Erdfelt 2016-01-28 13:42:18 -07:00
parent 83bc83a99d
commit 14ec878d42
2 changed files with 16 additions and 2 deletions

View File

@ -18,8 +18,9 @@
package org.eclipse.jetty.jstl;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.assertThat;
import java.io.File;
import java.io.IOException;
@ -75,6 +76,16 @@ public class JstlTest
WebAppContext context = new WebAppContext();
context.setContextPath("/");
/* TODO: Bug #486530 - sub-handler on WebAppContext prevents startup
context.setHandler(new AbstractHandler()
{
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
}
});
*/
File scratchDir = MavenTestingUtils.getTargetFile("tests/" + JstlTest.class.getSimpleName() + "-scratch");
FS.ensureEmpty(scratchDir);
JspConfig.init(context,testWebAppDir.toURI(),scratchDir);

View File

@ -0,0 +1,3 @@
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
# org.eclipse.jetty.LEVEL=INFO
# org.eclipse.jetty.util.LEVEL=DEBUG