Announcement Announcement Module
Collapse
No announcement yet.
ACEGI and RedirectView No Worky Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ACEGI and RedirectView No Worky

    I have a WelcomeController which does nothing more than return a new ModelAndView("testFormRedirect") which is defined in views.properties as a RedirectView with the url of "/puncher/secure/test.htm" which is then mapped in my puncher-servlet.xml to the testFormController which is defined in the same puncher-servlet.xml. The problem is that the redirect works fine the first time, right after authorizing through ACEGI and CAS, but then if I go back to the same URL afterwards (in the same browser instance), the browser will hang. It freezes with the url:

    https://blahblahblah:8443/cas/login?...security_check


    ---views.properties---
    testFormRedirect.class=org.springframework.web.ser vlet.view.RedirectView
    testFormRedirect.url=/puncher/secure/test.htm

    testForm.class=org.springframework.web.servlet.vie w.JstlView
    testForm.url=/WEB-INF/jsp/dumbPunch.jsp


    ---part of web.xml---
    Code:
    <filter>
            <filter-name>Acegi Channel Processing Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.securechannel.ChannelProcessingFilter</param-value>
            </init-param>
        </filter>
    
        <filter>
            <filter-name>Acegi CAS Processing Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.ui.cas.CasProcessingFilter</param-value>
            </init-param>
        </filter>
    
        <filter>
            <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.ui.basicauth.BasicProcessingFilter</param-value>
            </init-param>
        </filter>
    
        <!-- Obtains Authentication from HttpSession attribute, puts it into
    		 ContextHolder for request duration, proceeds with request, then
    		 copies Authentication from ContextHolder back into HttpSession -->
        <filter>
            <filter-name>Acegi Security System for Spring HttpSession Integration Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.ui.webapp.HttpSessionIntegrationFilter</param-value>
            </init-param>
        </filter>
    
        <filter>
            <filter-name>Acegi HTTP Request Security Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter</param-value>
            </init-param>
        </filter>
    
        <filter-mapping>
          <filter-name>Acegi Channel Processing Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <filter-mapping>
          <filter-name>Acegi CAS Processing Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <filter-mapping>
          <filter-name>Acegi HTTP BASIC Authorization Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <filter-mapping>
          <filter-name>Acegi Security System for Spring HttpSession Integration Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
        
        <filter-mapping>
          <filter-name>Acegi HTTP Request Security Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
    ---part of servlet.xml---

    Code:
    <bean id="welcomeController" class="com.sccc.puncher.web.WelcomeController">
    		<property name="puncher"><ref local="puncher" /></property>
    		<property name="csrView"><value>testFormRedirect</value></property>
    		<property name="teamLeadView"><value>teamLeadWelcome</value></property>
    		<property name="supervisorView"><value>supervisorWelcome</value></property>
    		<property name="managerView"><value>managerWelcome</value></property>
    		<property name="supportView"><value>managerWelcome</value></property>
    	</bean>
    
    <bean id="testFormController" class="com.sccc.puncher.web.TestFormController">
    		<property name="puncher"><ref local="puncher" /></property>
    		<property name="msg"><value>Hello Dad, I'm in jail!</value></property>
    		<property name="formView"><value>testForm</value></property>
    		<property name="commandName"><value>string</value></property>
    		<property name="commandClass"><value>java.lang.String</value></property>
    		<property name="successView"><value>testForm</value></property>
    	</bean>
    
    	<bean id="urlMapping"
    		class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    		<property name="mappings">
    			<props>
    				<prop key="/secure/welcome.htm">welcomeController</prop>
    				<!-- <prop key="/login.htm">loginFormController</prop> -->
    				<prop key="/secure/punch.htm">punchFormController</prop>
    				<prop key="/secure/test.htm">testFormController</prop>
    			</props>
    		</property>
    	</bean>


    If anyone has any ideas or could point me in any direction -other- than where I've been trying to pull answers from the last couple days, please let me know.

    Thanks!
    -t

  • #2
    Latest Version Fix

    I upgraded the ACEGI libraries to the latest (0.8.0) version from their site, and it seems to have fixed the problem. It required some reconfiguring of the filters for the new ACEGI, but it seems cleaner.

    Comment

    Working...
    X