public void addContextParams(String... contextParams) { this.contextParams = MapUtils.asMap(contextParams); }
public WebAppSpecification getWebAppSpecification() { WebAppSpecification webAppSpec = new WebAppSpecification(); webAppSpec.addFilterSpecification( NakedObjectsSessionFilter.class, MapUtils.asMap(NakedObjectsSessionFilter.LOGON_PAGE_KEY, LOGON_PAGE_MAPPED), DYNAMIC_CONTENT); webAppSpec.addServletSpecification(LogonServlet.class, LOGON_PAGE_MAPPED); webAppSpec.addServletSpecification(ControllerServlet.class, DYNAMIC_CONTENT); webAppSpec.addFilterSpecification(StaticContentFilter.class, STATIC_CONTENT); webAppSpec.addServletSpecification(ResourceServlet.class, STATIC_CONTENT ); final String resourceBaseDir = getConfiguration().getString(HtmlViewerConstants.VIEWER_HTML_RESOURCE_BASE_KEY); if (resourceBaseDir != null) { webAppSpec.addResourcePath(resourceBaseDir); } webAppSpec.addResourcePath("./src/main/resources"); webAppSpec.addResourcePath("./src/main/webapp"); webAppSpec.addResourcePath("./web"); webAppSpec.addResourcePath("."); webAppSpec.addWelcomeFile(LOGON_PAGE); webAppSpec.setLogHint("open a web browser and browse to logon.app to connect"); return webAppSpec; } };