I'm doing the following in my unit tests to set up the test server. It
works fine except that JSP viewables throw an error that they're not
found. Any thoughts on how to fix this?
descriptor = new WebAppDescriptor.Builder("com.anuff.testapp.rest")
.contextParam("contextConfigLocation",
"classpath:testApplicationContext.xml")
.servletClass(SpringServlet.class)
.contextListenerClass(ContextLoaderListener.class)
.requestListenerClass(RequestContextListener.class)
.initParam("com.sun.jersey.config.property.packages",
"com.anuff.testapp.rest")
.initParam("com.sun.jersey.api.json.POJOMappingFeature", "true")
.initParam(
"com.sun.jersey.spi.container.ResourceFilters",
"com.sun.jersey.api.container.filter.RolesAllowedResourceFilterFactory")
.initParam(
"com.sun.jersey.config.property.JSPTemplatesBasePath",
"/WEB-INF/jsp")
.initParam(
"com.sun.jersey.config.property.WebPageContentRegex",
"/(((images|css|js|jsp|WEB-INF/jsp)/.*)|(favicon\\.ico))")
.addFilter(DelegatingFilterProxy.class, "shiroFilter",
MapUtils.hashMap("targetFilterLifecycle", "true"))
.clientConfig(clientConfig).build();