tdmcginley

web.xml

May 13th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  3. <display-name>Survey</display-name>
  4. <!-- Spring -->
  5. <listener> <!-- Required for the struts2 spring plugin to work -->
  6. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  7. </listener>
  8. <filter> <!-- Get spring to keep the session open for the whole request, so hibernate's lazy loads work -->
  9. <filter-name>openSessionInViewFilter</filter-name>
  10. <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
  11. </filter>
  12. <filter-mapping>
  13. <filter-name>openSessionInViewFilter</filter-name>
  14. <url-pattern>/*</url-pattern>
  15. </filter-mapping>
  16. <!-- Sitemesh (needs to be before struts) -->
  17. <filter>
  18. <filter-name>sitemesh</filter-name>
  19. <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
  20. </filter>
  21. <filter-mapping>
  22. <filter-name>sitemesh</filter-name>
  23. <url-pattern>/*</url-pattern>
  24. </filter-mapping>
  25.  
  26. <!-- Struts2 config (needs to be after sitemesh) -->
  27. <filter>
  28. <filter-name>struts2</filter-name>
  29. <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  30. </filter>
  31. <filter-mapping>
  32. <filter-name>struts2</filter-name>
  33. <url-pattern>/*</url-pattern>
  34. </filter-mapping>
  35. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment