1.  
  2. web.xml
  3.  
  4.  
  5. <?xml version="1.0" encoding="UTF-8" ?>
  6. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.4">
  7. <display-name>Struts2Example1</display-name>
  8. <filter>
  9. <filter-name>struts2</filter-name>
  10. <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  11. </filter>
  12.  
  13. <listener>
  14. <listener-class>
  15. org.springframework.web.context.ContextLoaderListener
  16. </listener-class>
  17. </listener>
  18.  
  19.  
  20.  
  21. <context-param>
  22. <param-name>contextConfigLocation</param-name>
  23. <param-value>/WEB-INF/struts-acegiXML.xml</param-value>
  24. </context-param>
  25.  
  26.  
  27.  
  28.  
  29.  
  30. <filter-mapping>
  31. <filter-name>struts2</filter-name>
  32. <url-pattern>/*</url-pattern>
  33. </filter-mapping>
  34.  
  35.  
  36. <filter>
  37. <filter-name>Acegi Filter Chain Proxy</filter-name>
  38. <filter-class>
  39. org.acegisecurity.util.FilterToBeanProxy
  40. </filter-class>
  41. <init-param>
  42. <param-name>targetBean</param-name>
  43. <param-value>filterChainProxy</param-value>
  44. </init-param>
  45. </filter>
  46.  
  47. <filter-mapping>
  48. <filter-name>Acegi Filter Chain Proxy</filter-name>
  49. <url-pattern>/*</url-pattern>
  50. </filter-mapping>
  51.  
  52. <welcome-file-list>
  53. <welcome-file>index.jsp</welcome-file>
  54. </welcome-file-list>
  55. </web-app>