it.eng.spagobi.commons.filters
Class SpagoBICoreCheckSessionFilter

java.lang.Object
  extended by it.eng.spagobi.commons.filters.SpagoBICoreCheckSessionFilter
All Implemented Interfaces:
javax.servlet.Filter

public class SpagoBICoreCheckSessionFilter
extends java.lang.Object
implements javax.servlet.Filter

This filter is in charge of checking if the session has expired on SpagoBI core. If the session has expired and there is no request to open a new session, call is forwarded to configured (in spagobi.xml) session expired URL. This filter is required when using CAS: if the SpagoBI session has expired, the request will not be correctly processed with a new clean session. Moreover, if the CAS ticket is not valid, the call is redirected to CAS login page and Ajax requests will not be able to handle the resulting HTML page. Therefore this filter must be put just before the CAS filter.

Author:
Davide Zerbetto (davide.zerbetto@eng.it)

Field Summary
static java.lang.String NEW_SESSION
           
 
Constructor Summary
SpagoBICoreCheckSessionFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
 void init(javax.servlet.FilterConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW_SESSION

public static final java.lang.String NEW_SESSION
See Also:
Constant Field Values
Constructor Detail

SpagoBICoreCheckSessionFilter

public SpagoBICoreCheckSessionFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException