Created
February 16, 2011 00:26
-
-
Save ALRubinger/828591 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final String webApp = Descriptors.create(WebAppDescriptor.class) | |
.moduleName("test") | |
.description("A description of my webapp") | |
.displayName("Sample") | |
.distributable() | |
.contextParam("com.sun.faces.validateXml", true) | |
.facesDevelopmentMode() | |
.facesStateSavingMethod(StateManager.STATE_SAVING_METHOD_CLIENT) | |
.listener("org.jboss.seam.servlet.SeamListener") | |
.filter("UrlRewriteFilter", "org.tuckey.web.filters.urlrewrite.UrlRewriteFilter", new String[] | |
{"/*"}) | |
.initParam("confReloadCheckInterval", 60) | |
.facesServlet() | |
.servlet("Download Servlet", "com.acme.webapp.DownloadServlet", new String[] | |
{"/file/*"}) | |
.welcomeFile("/index.jsf") | |
.sessionTimeout(60) | |
.sessionTrackingModes(TrackingModeType.URL) | |
.errorPage(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "/500.jsp") | |
.errorPage(IOException.class, "/outputError.jsp") | |
.loginConfig(AuthMethodType.BASIC, "Cool App") | |
.formLoginConfig("/login.jsp", "/invalidLogin.jsp") | |
.securityConstraint() | |
.webResourceCollection("All Access") | |
.urlPatterns("/public/*") | |
.httpMethods(HttpMethodType.DELETE, HttpMethodType.PUT, HttpMethodType.HEAD, HttpMethodType.OPTIONS, | |
HttpMethodType.TRACE, HttpMethodType.GET, HttpMethodType.POST) | |
.userDataConstraint(TransportGuaranteeType.NONE).securityConstraint("Restricted GET To Employees") | |
.webResourceCollection("Restricted Access - Get Only", "/restricted/employee/*", HttpMethodType.GET) | |
.authConstraint("Employee").userDataConstraint(TransportGuaranteeType.NONE) | |
.securityConstraint("Restrict access to Facelets templates (XHTML files)") | |
.webResourceCollection("Facelets templates").urlPatterns("*.xhtml").httpMethods(true, HttpMethodType.HEAD) | |
.authConstraint().userDataConstraint(TransportGuaranteeType.NONE) | |
.securityRole("Employee", "Employees of the company").absoluteOrdering("one", "two", "three") | |
.exportAsString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment