} catch (IllegalInputException e) { messageLogger.logWarn("Illegal SSO ticket value", cookieValue, e);
    public void doGet(final HttpServletRequest request, final HttpServletResponse response) {        final Properties config = RequestUtil.getConfig(getServletContext());        String ssoCookieName = config.getProperty(RequestUtil.PROP_COOKIE_SSO);        if (ssoCookieName == null || ssoCookieName.equals("")) {            ssoCookieName = "MoriaSSOCookie";            messageLogger.logWarn("Parameter: " + RequestUtil.PROP_COOKIE_SSO                                  + " not set in config. Using default value: "                                  + ssoCookieName);        }        final Cookie[] cookies = request.getCookies();        String cookieValue = null;        if (cookies != null) {            cookieValue = RequestUtil.getCookieValue(ssoCookieName, cookies);        } else {            showPage(request, response);        }        if (cookieValue == null) {            // TODO: Check for redir parameter first            showPage(request, response);        }        /* Invalidate ticket. */        boolean controllerFailed = false;        try {            MoriaController.invalidateSSOTicket(cookieValue);        } catch (InoperableStateException ise) {            messageLogger.logWarn("Controller in inoperable state.", cookieValue, ise);            controllerFailed = true;        }        if (controllerFailed) {            final RequestDispatcher requestDispatcher = getServletContext().getNamedDispatcher("JSP-Error.JSP");            try {                requestDispatcher.forward(request, response);            } catch (Exception e) {                messageLogger.logCritical("Dispatch to JSP-Error.JSP failed", cookieValue, e);            }            /* If everything fails there's not much to do but return. */            return;        }        /* Remove cookie if set. */        if (cookieValue != null) {            final Cookie ssoCookie = RequestUtil.createCookie(config.getProperty(RequestUtil.PROP_COOKIE_SSO),                                                              cookieValue, 0);            response.addCookie(ssoCookie);        }        /* If redirect url is given in the request; redirect. Else         * display default response page.         */        String urlParam = config.getProperty(RequestUtil.PROP_LOGOUT_URL_PARAM);        if (urlParam == null) {            urlParam = "redirURL";            messageLogger.logWarn("Parameter: " + RequestUtil.PROP_LOGOUT_URL_PARAM                                  + " not set in config. Using default value: "                                  + urlParam);        }        final String url = request.getParameter(urlParam);        if (url != null) {            response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);            response.addHeader("Location", url);        } else {            showPage(request, response);        }    }