|
|
|
|
@ -118,18 +118,21 @@ public class Utils {
|
|
|
|
|
ServletContext paContext = session.getServletContext();
|
|
|
|
|
ServletContext aatContext = paContext.getContext( "/AnaliseAcidentesTrabalho" );
|
|
|
|
|
|
|
|
|
|
Map< String, Object > mapData = ( Map< String, Object > ) aatContext.getAttribute( aatSessionID );
|
|
|
|
|
if ( mapData != null )
|
|
|
|
|
if ( aatContext != null && aatSessionID != null )
|
|
|
|
|
{
|
|
|
|
|
HttpSession aatSession = ( HttpSession ) mapData.get( "session" );
|
|
|
|
|
try
|
|
|
|
|
Map< String, Object > mapData = ( Map< String, Object > ) aatContext.getAttribute( aatSessionID );
|
|
|
|
|
if ( mapData != null )
|
|
|
|
|
{
|
|
|
|
|
aatSession.invalidate();
|
|
|
|
|
}
|
|
|
|
|
catch ( IllegalStateException e )
|
|
|
|
|
{
|
|
|
|
|
// ErrorLogger.logException( e );
|
|
|
|
|
System.out.println( "Session already invalidated." );
|
|
|
|
|
HttpSession aatSession = ( HttpSession ) mapData.get( "session" );
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
aatSession.invalidate();
|
|
|
|
|
}
|
|
|
|
|
catch ( IllegalStateException e )
|
|
|
|
|
{
|
|
|
|
|
// ErrorLogger.logException( e );
|
|
|
|
|
System.out.println( "Session already invalidated." );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|