if (hsess != null) {
if (hsess.getAttribute(dtid) != null) { //with the preset token
hsess.removeAttribute(dtid);
final Session sess = ((WebAppCtrl)_webApp).getSessionCache().get(hsess);
if (sess != null) {
final DesktopCache cache = ((WebAppCtrl)_webApp).getDesktopCache(sess);
if (cache != null) {
final Desktop olddesktop = cache.getDesktopIfAny(dtid);
if (olddesktop != null) {
//set ATTR_DESKTOP, so will reuse the old desktop
request.setAttribute(ATTR_DESKTOP, olddesktop);
//cleanup the "au" channel to avoid get the
// residue of the previous desktop operation