log.logCritical("Configuration: " + config.toString());
    public final void doPost(final HttpServletRequest request, final HttpServletResponse response)    throws IOException, ServletException {        String jspLocation = getServletContext().getInitParameter("jsp.location");        log.logCritical("jsp.location is '" + jspLocation + "'");        String moriaID = null;        boolean error = false;        try {            MoriaController.initController(getServletContext());            log.logCritical("Requested attributes: " + request.getParameter("attributes"));            log.logCritical("URL prefix: " + request.getParameter("urlPrefix"));            log.logCritical("URL postfix: " + request.getParameter("urlPostfix"));            log.logCritical("Principal: " + request.getParameter("principal"));            moriaID = MoriaController.initiateAuthentication(request.getParameter("attributes").split(","), request.getParameter("urlPrefix"), request.getParameter("urlPostfix"), false, request.getParameter("principal"));            log.logCritical("Moria ID is now " + moriaID);        } catch (IllegalInputException e) {            error = true;            log.logCritical("IllegalInputException");            request.setAttribute("error", e);        } catch (AuthorizationException e) {            error = true;            log.logCritical("AuthorizationException");            request.setAttribute("error", e);        } catch (InoperableStateException e) {            error = true;            log.logCritical("InoperableStateException");            request.setAttribute("error", e);        }        if (!error) {            Properties config = (Properties) getServletContext().getAttribute(RequestUtil.PROP_CONFIG);            log.logCritical("Configuration: " + config.toString());            String redirectURL = config.getProperty(RequestUtil.PROP_LOGIN_URL_PREFIX) + "?" + config.getProperty(RequestUtil.PROP_LOGIN_TICKET_PARAM) + "=" + moriaID;            log.logCritical("Redirect URL: " + redirectURL);            response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);            response.setHeader("Location", redirectURL);        } else {            log.logCritical("error!");            RequestDispatcher rd = getServletContext().getRequestDispatcher(jspLocation + "/client.jsp");            rd.include(request, response);        }    }