| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| --> |
| |
| <web-app |
| xmlns="http://java.sun.com/xml/ns/javaee" |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" |
| version="3.0"> |
| |
| <display-name>Tobago Demo Application</display-name> |
| |
| <!-- for jetty also check src/test/jetty/override-myfaces-web.xml or src/test/jetty/override-mojarra-web.xml --> |
| <context-param> |
| <param-name>javax.faces.PROJECT_STAGE</param-name> |
| <!--<param-value>Development</param-value>--> |
| <param-value>Production</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>com.sun.faces.validateXml</param-name> |
| <param-value>true</param-value> |
| </context-param> |
| |
| <!-- enable for websockets --> |
| <context-param> |
| <param-name>javax.faces.ENABLE_WEBSOCKET_ENDPOINT</param-name> |
| <param-value>true</param-value> |
| </context-param> |
| |
| <!-- disable error handling from myfaces, needed for the demo --> |
| <context-param> |
| <param-name>org.apache.myfaces.ERROR_HANDLING</param-name> |
| <param-value>false</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> |
| <param-value>true</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name> |
| <param-value>*.xhtml</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name> |
| <param-value>true</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name> |
| <param-value>true</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> |
| <param-value>20</param-value> |
| </context-param> |
| |
| <context-param> |
| <param-name>org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION</param-name> |
| <param-value>4</param-value> |
| </context-param> |
| |
| <listener> |
| <listener-class>org.apache.myfaces.tobago.example.demo.info.ActivitySessionListener</listener-class> |
| </listener> |
| |
| <!-- activate this for some containers --> |
| <!-- |
| <listener> |
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> |
| </listener> |
| --> |
| |
| <!-- activate this for some containers --> |
| <listener> |
| <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class> |
| </listener> |
| |
| <filter> |
| <filter-name>LoggingMdcFilter</filter-name> |
| <filter-class>org.apache.myfaces.tobago.internal.webapp.LoggingMdcFilter</filter-class> |
| </filter> |
| <filter-mapping> |
| <filter-name>LoggingMdcFilter</filter-name> |
| <url-pattern>/*</url-pattern> |
| </filter-mapping> |
| |
| <!-- Error handling, see also these classes: |
| org.apache.myfaces.tobago.example.demo.TobagoExceptionHandler |
| --> |
| |
| <error-page> |
| <error-code>404</error-code> |
| <location>/error/404.xhtml</location> |
| </error-page> |
| |
| <error-page> |
| <error-code>500</error-code> |
| <location>/error/exception.xhtml</location> |
| </error-page> |
| |
| <error-page> |
| <exception-type>java.lang.Exception</exception-type> |
| <location>/error/exception.xhtml</location> |
| </error-page> |
| |
| <!-- The Usual Welcome File List --> |
| <welcome-file-list> |
| <welcome-file>init.xhtml</welcome-file> |
| </welcome-file-list> |
| |
| <session-config> |
| <!-- for WebSphere you need to comment out this block, because WebSphere want to set it himself --> |
| <cookie-config> |
| <http-only>true</http-only> |
| <!-- with secure=true you can only use https, not http --> |
| <!--<secure>true</secure>--> |
| </cookie-config> |
| </session-config> |
| |
| <security-constraint> |
| <display-name>Security Constraint</display-name> |
| <web-resource-collection> |
| <web-resource-name>Application Area</web-resource-name> |
| <url-pattern>/content/30-concept/80-security/20-roles/*</url-pattern> |
| </web-resource-collection> |
| <auth-constraint> |
| <role-name>demo-admin</role-name> |
| <role-name>demo-guest</role-name> |
| </auth-constraint> |
| </security-constraint> |
| |
| <login-config> |
| <auth-method>FORM</auth-method> |
| <realm-name>demo-realm</realm-name> |
| <form-login-config> |
| <form-login-page>/login.xhtml</form-login-page> |
| <form-error-page>/login.xhtml</form-error-page> |
| </form-login-config> |
| </login-config> |
| |
| <security-role> |
| <role-name>demo-admin</role-name> |
| </security-role> |
| <security-role> |
| <role-name>demo-guest</role-name> |
| </security-role> |
| |
| </web-app> |