web.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app 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" version="2.4">
  3. <display-name>Central Authentication System (CAS) 3.0</display-name>
  4. <context-param>
  5. <param-name>contextConfigLocation</param-name>
  6. <param-value>
  7. /WEB-INF/applicationContext.xml,
  8. /WEB-INF/deployerConfigContext.xml
  9. </param-value>
  10. </context-param>
  11. <context-param>
  12. <param-name>com.kingdee.eas.portal.defaultLanguage</param-name>
  13. <param-value>L2</param-value>
  14. </context-param>
  15. <!--
  16. place this into the contextConfigLocation to enable
  17. service restrictions.
  18. /WEB-INF/approvedServices.xml,
  19. place this into the contextConfigLocation to enable remote services
  20. /WEB-INF/remoteServices.xml,
  21. classpath:org/codehaus/xfire/spring/xfire.xml
  22. place this into the contextConfigLocation to enable the event publishing
  23. /WEB-INF/auditTrailContext.xml,
  24. -->
  25. <!--
  26. - Location of the Log4J config file, for initialization and refresh checks.
  27. - Applied by Log4jConfigListener.
  28. -->
  29. <context-param>
  30. <param-name>log4jConfigLocation</param-name>
  31. <param-value>classpath:log4j.properties</param-value>
  32. </context-param>
  33. <context-param>
  34. <param-name>log4jExposeWebAppRoot</param-name>
  35. <param-value>false</param-value>
  36. </context-param>
  37. <filter>
  38. <filter-name>Set Character Encoding Filter</filter-name>
  39. <filter-class>com.kingdee.eas.cp.common.web.filters.SetCharacterEncodingFilter</filter-class>
  40. <init-param>
  41. <param-name>encoding</param-name>
  42. <param-value>UTF-8</param-value>
  43. </init-param>
  44. <init-param>
  45. <param-name>ignore</param-name>
  46. <param-value>true</param-value>
  47. </init-param>
  48. </filter>
  49. <filter>
  50. <filter-name>SSO CacheResource Filter</filter-name>
  51. <filter-class>com.kingdee.eas.cp.eip.sso.web.cache.SSOCacheResourceFilter</filter-class>
  52. </filter>
  53. <filter-mapping>
  54. <filter-name>Set Character Encoding Filter</filter-name>
  55. <url-pattern>/*</url-pattern>
  56. </filter-mapping>
  57. <filter-mapping>
  58. <filter-name>SSO CacheResource Filter</filter-name>
  59. <url-pattern>/*</url-pattern>
  60. </filter-mapping>
  61. <!--
  62. - Configures Log4J for this web app.
  63. - As this context specifies a context-param "log4jConfigLocation", its file path
  64. - is used to load the Log4J configuration, including periodic refresh checks.
  65. -
  66. - Would fall back to default Log4J initialization (non-refreshing) if no special
  67. - context-params are given.
  68. -
  69. - Exports a "web app root key", i.e. a system property that specifies the root
  70. - directory of this web app, for usage in log file paths.
  71. - This web app specifies "cas.root" (see log4j.properties file).
  72. -->
  73. <!-- Leave the listener commented-out if using JBoss -->
  74. <!-- apusic have contained common log
  75. <listener>
  76. <listener-class>
  77. org.springframework.web.util.Log4jConfigListener
  78. </listener-class>
  79. </listener>
  80. -->
  81. <!--
  82. - Loads the CAS ApplicationContext.
  83. - The deployer choice here is how to handle Throwables thrown by Spring's
  84. - ContextLoaderListener. The Spring ContextLoaderListener will throw an exception when the
  85. - application context cannot be loaded, say because the bean XML files are not valid XML or do not
  86. - refer to real classes and properties or because a bean configured via Spring throws an exception
  87. - at construction, property setting, or on an afterPropertiesSet() lifecycle method.
  88. -
  89. - If you'd like these errors to be fatal and prevent the CAS servlet context from loading at all,
  90. - use org.springframework.web.context.ContextLoaderListener.
  91. -
  92. - If you'd like these errors to result in all requests for CAS getting a "CAS is Unavailable" response,
  93. - use org.jasig.cas.web.init.SafeContextLoaderListener.
  94. - for all requests.
  95. -->
  96. <listener>
  97. <listener-class>
  98. org.jasig.cas.web.init.SafeContextLoaderListener
  99. </listener-class>
  100. </listener>
  101. <!--
  102. - This is the Spring dispatcher servlet which delegates all requests to the
  103. - Spring WebMVC controllers as configured in cas-servlet.xml.
  104. -
  105. - The choice made above about how to handle a broken ApplicationContext at
  106. - context initialization applies here as well, sicne this servlet is load-on-startup.
  107. -
  108. - If you'd like these errors to be fatal and prevent the CAS servlet from loading at all,
  109. - use org.springframework.web.servlet.DispatcherServlet.
  110. -
  111. - If you'd like these errors to result in all requests for CAS getting a "CAS is Unavailable" response,
  112. - use org.jasig.cas.web.init.SafeDispatcherServlet for all requests serviced by this servlet.
  113. -->
  114. <servlet>
  115. <servlet-name>cas</servlet-name>
  116. <servlet-class>
  117. org.jasig.cas.web.init.SafeDispatcherServlet
  118. </servlet-class>
  119. <init-param>
  120. <param-name>publishContext</param-name>
  121. <param-value>false</param-value>
  122. </init-param>
  123. </servlet>
  124. <servlet>
  125. <servlet-name>action</servlet-name>
  126. <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  127. <load-on-startup>1</load-on-startup>
  128. </servlet>
  129. <!--login form start-->
  130. <!--servlet>
  131. <servlet-name>Struts Action</servlet-name>
  132. <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
  133. <init-param>
  134. <param-name>config</param-name>
  135. <param-value>/WEB-INF/struts-config.xml</param-value>
  136. </init-param>
  137. <load-on-startup>1</load-on-startup>
  138. </servlet-->
  139. <!--login form end-->
  140. <servlet-mapping>
  141. <servlet-name>cas</servlet-name>
  142. <url-pattern>/login</url-pattern>
  143. </servlet-mapping>
  144. <servlet-mapping>
  145. <servlet-name>cas</servlet-name>
  146. <url-pattern>/logout</url-pattern>
  147. </servlet-mapping>
  148. <servlet-mapping>
  149. <servlet-name>cas</servlet-name>
  150. <url-pattern>/validate</url-pattern>
  151. </servlet-mapping>
  152. <servlet-mapping>
  153. <servlet-name>cas</servlet-name>
  154. <url-pattern>/serviceValidate</url-pattern>
  155. </servlet-mapping>
  156. <servlet-mapping>
  157. <servlet-name>cas</servlet-name>
  158. <url-pattern>/proxy</url-pattern>
  159. </servlet-mapping>
  160. <servlet-mapping>
  161. <servlet-name>cas</servlet-name>
  162. <url-pattern>/proxyValidate</url-pattern>
  163. </servlet-mapping>
  164. <servlet-mapping>
  165. <servlet-name>cas</servlet-name>
  166. <url-pattern>/CentralAuthenticationService</url-pattern>
  167. </servlet-mapping>
  168. <session-config>
  169. <!-- Default to 5 minute session timeouts -->
  170. <session-timeout>5</session-timeout>
  171. </session-config>
  172. <error-page>
  173. <exception-type>org.springframework.context.ApplicationContextException</exception-type>
  174. <location>/WEB-INF/view/jsp/brokenContext.jsp</location>
  175. </error-page>
  176. <error-page>
  177. <exception-type>java.lang.Exception</exception-type>
  178. <location>/WEB-INF/view/jsp/errors.jsp</location>
  179. </error-page>
  180. <error-page>
  181. <error-code>404</error-code>
  182. <location>/</location>
  183. </error-page>
  184. <jsp-config>
  185. <taglib>
  186. <taglib-uri>/WEB-INF/tld/struts-bean.tld</taglib-uri>
  187. <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
  188. </taglib>
  189. <taglib>
  190. <taglib-uri>/WEB-INF/tld/struts-html.tld</taglib-uri>
  191. <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
  192. </taglib>
  193. <taglib>
  194. <taglib-uri>http://www.springframework.org/tags</taglib-uri>
  195. <taglib-location>/WEB-INF/tld/spring.tld</taglib-location>
  196. </taglib>
  197. <taglib>
  198. <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
  199. <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
  200. </taglib>
  201. <taglib>
  202. <taglib-uri>http://java.sun.com/jsp/jstl/functions</taglib-uri>
  203. <taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
  204. </taglib>
  205. </jsp-config>
  206. </web-app>