2
0

exception-translation-autodetect-handler.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:security="http://www.springframework.org/schema/security"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  6. http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
  7. <!-- http://www.springframework.org/schema/security file:/Users/vpuri/interface21/acegisecurity/trunk/acegisecurity/core/src/main/resources/org/acegisecurity/config/spring-security-2.0.xsd -->
  8. <!-- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd" -->
  9. <!-- Basically accessDeniedUrl is optional, we if unspecified impl will auto-detect any AccessDeniedHandler in ctx and use it;
  10. alternately if there are > 1 such handlers, we can nominate the one to use via accessDeniedBeanRef; provide nested elements for
  11. other props; i do not mind if you move the access denied stuff to a sub-element -->
  12. <security:exception-translation id="exceptionTranslationFilter">
  13. <security:entry-point
  14. entryPointBeanRef="authenticationProcessingFilterEntryPoint" />
  15. <!--<security:access-denied accessDeniedBeanRef="theBeanToUse" />-->
  16. </security:exception-translation>
  17. <bean id="theBeanToUse"
  18. class="org.springframework.security.ui.AccessDeniedHandlerImpl">
  19. <property name="errorPage" value="/accessDenied.jsp" />
  20. </bean>
  21. <!--<bean id="anotherBeanToUse"
  22. class="org.springframework.security.ui.AccessDeniedHandlerImpl">
  23. <property name="errorPage" value="/accessDenied.jsp" />
  24. </bean>-->
  25. <bean id="authenticationProcessingFilterEntryPoint"
  26. class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
  27. <property name="loginFormUrl">
  28. <value>/acegilogin.jsp</value>
  29. </property>
  30. <property name="forceHttps">
  31. <value>false</value>
  32. </property>
  33. </bean>
  34. </beans>