Announcement Announcement Module
Collapse
No announcement yet.
Auto-Redirect on Session timeout Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto-Redirect on Session timeout

    Hi,

    I am using Spring-Blazeds integration for our flex application running on Tomcat.
    I want to implement session timeout Auto-Redirection in UI.

    There is a spring configuration file called protect-config.xml in which following code initiates an http request http://localhost:8080/login/login.htm on session timeout(whatever time value specified in <session-config> in web.xml, if not specified it will be default 30 mins).

    Code:
    <beans:bean id="sessionMgmtFilter" class="org.springframework.security.web.session.SessionManagementFilter" >
    	    <beans:constructor-arg ref="securityContextRepository" />
    	    <beans:property name="invalidSessionUrl" value="/login/login.htm"/>
    </beans:bean>
    Now, the problem is my UI is not getting redirected automatically to Login screen back. When I check HTTP live headers in mozilla then I am able to see that http://localhost:8080/login/login.htm is requested with GET request on browser but Browser URL remains unchanged and hence the UI page.

    Please help.

    Miral

  • #2
    Any responses?

    I am not able to find any solution to this question.
    If any senior member has knowledge about this topic then please let me know.

    It's critical.

    Thanks in advance,
    Miral

    Comment


    • #3
      Hi Miralkumar,

      You might want to try the ConcurrencySessionFilter:

      Code:
        <bean id="concurrencyFilter"
            class="org.springframework.security.web.session.ConcurrentSessionFilter">
          <property name="sessionRegistry" ref="sessionRegistry" />
          <property name="expiredUrl" value="/session-expired.htm" />
        </bean>
      
      <bean id="sessionRegistry" class="org.springframework.security.core.session.SessionRegistryImpl" />
      Details can be found at: http://static.springsource.org/sprin...sion-mgmt.html

      This filter should be placed in your filter chain before your SecurityContextPersistenceFilter and after your ChannelProcessingFilter (if you have one).

      Comment


      • #4
        The Flash Player basically ignores redirects when communicating over AMF channels, and as I recall, you can't get to the response code very easily through the ActionScript API. In order to redirect, I believe you'd need to use the JavaScript bridge.

        Comment


        • #5
          Work Around

          I have handled all flex fault events and then depending on the fault details I take according action.

          Comment


          • #6
            I have created one page and it has a button that allows the user to return to the application it means restart a session in the application, all of my code works correctly, when I try to redirect them back to the application start page, at that point it just detects that the session has timeout and redirects them back to the session timeout page.

            Comment

            Working...
            X