* remove it.
*/
public static void removeLongLivedPageFlow( String modulePath, HttpServletRequest request,
ServletContext servletContext )
{
StorageHandler sh = Handlers.get( servletContext ).getStorageHandler();
HttpServletRequest unwrappedRequest = unwrapMultipart( request );
RequestContext rc = new RequestContext( unwrappedRequest, null );
String attrName = InternalUtils.getLongLivedFlowAttr( modulePath );
attrName = ScopedServletUtils.getScopedSessionAttrName( attrName, unwrappedRequest );
sh.removeAttribute( rc, attrName );
//
// Now, if the current page flow is long-lived, remove the reference.
//
String currentLongLivedAttrName =
ScopedServletUtils.getScopedSessionAttrName( CURRENT_LONGLIVED_ATTR, unwrappedRequest );
String currentLongLivedModulePath =
( String ) sh.getAttribute( rc, currentLongLivedAttrName );
if ( modulePath.equals( currentLongLivedModulePath ) )
{
sh.removeAttribute( rc, currentLongLivedAttrName );
}
}