Advertisement
Guest User

web.xml

a guest
May 22nd, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.19 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app version="3.0" 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">
  3.     <context-param>
  4.         <param-name>contextConfigLocation</param-name>
  5.         <param-value>
  6.             /WEB-INF/applicationContext.xml
  7.             /WEB-INF/spring-security.xml
  8.         </param-value>
  9.     </context-param>
  10.     <context-param>
  11.         <param-name>javax.faces.PROJECT_STAGE</param-name>
  12.         <!--<param-value>Development</param-value>-->
  13.         <param-value>Production</param-value>
  14.     </context-param>
  15.    
  16.     <filter>
  17.         <filter-name>springSecurityFilterChain</filter-name>
  18.         <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  19.     </filter>
  20.    
  21.     <filter-mapping>
  22.         <filter-name>springSecurityFilterChain</filter-name>
  23.         <url-pattern>/*</url-pattern>
  24.         <!--<dispatcher>REQUEST</dispatcher>
  25.        <dispatcher>FORWARD</dispatcher>-->
  26.     </filter-mapping>
  27.    
  28.     <listener>
  29.         <description>
  30.             This listener is here especially used to expose the request in org.springframework.security.web.authentication.AuthenticationSuccessHandler.
  31.             By default, that state is exposed by DispatcherServlet.
  32.             So, it is not available before the actual request enters DispatcherServlet (e.g. in Spring Security filters).
  33.         </description>
  34.         <listener-class>
  35.             org.springframework.web.context.request.RequestContextListener
  36.         </listener-class>
  37.     </listener>
  38.    
  39.     <listener>
  40.         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  41.     </listener>
  42.    
  43.     <listener>
  44.         <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
  45.     </listener>
  46.  
  47.     <servlet>
  48.         <servlet-name>Faces Servlet</servlet-name>
  49.         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  50.         <load-on-startup>1</load-on-startup>
  51.     </servlet>
  52.    
  53.     <servlet-mapping>
  54.         <servlet-name>Faces Servlet</servlet-name>
  55.         <url-pattern>*.jsf</url-pattern>
  56.     </servlet-mapping>
  57.    
  58.     <servlet-mapping>
  59.         <servlet-name>Faces Servlet</servlet-name>
  60.         <url-pattern>*.xhtml</url-pattern>
  61.     </servlet-mapping>
  62.    
  63.     <security-constraint>
  64.         <display-name>Restrict direct access to XHTML files</display-name>
  65.         <web-resource-collection>
  66.             <web-resource-name>XHTML files</web-resource-name>
  67.             <url-pattern>*.xhtml</url-pattern>
  68.         </web-resource-collection>
  69.         <auth-constraint />
  70.     </security-constraint>
  71.  
  72.     <session-config>
  73.         <session-timeout>
  74.             30
  75.         </session-timeout>
  76.     </session-config>
  77.  
  78.     <welcome-file-list>
  79.         <welcome-file>/utility/Login.jsf</welcome-file>
  80.     </welcome-file-list>
  81.    
  82.     <resource-ref>
  83.         <res-ref-name>jdbc/social_networking</res-ref-name>
  84.         <res-type>javax.sql.DataSource</res-type>
  85.         <res-auth>Container</res-auth>
  86.     </resource-ref>
  87. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement