request.getHeader("Accept-Language"), "en");
request.getHeader("Accept-Language"), (String) config.get(RequestUtil.PROP_LOGIN_DEFAULT_LANGUAGE));
    public void doGet(HttpServletRequest request, HttpServletResponse response)            throws ServletException, IOException {        if (request.getParameter("logout") != null) {            log.logInfo("Logout received");            storedticket = null;            storedmap = null;            final RequestDispatcher rd = getServletContext().getNamedDispatcher("Logout");            rd.forward(request, response);            return;        }        /*         * Makes a Properties object named config, which gets the config         * from the getConfig() method         */        Properties config;        try {            config = getConfig();        } catch (IllegalStateException e) {            config = null;        }        /* Resource bundle. */        String langFromCookie = null;        if (config != null && request.getCookies() != null) {            langFromCookie = RequestUtil.getCookieValue((String) config                    .get(RequestUtil.PROP_COOKIE_LANG), request                    .getCookies());        }                //FIXME "en"        final ResourceBundle bundle = RequestUtil.getBundle(                RequestUtil.BUNDLE_INFORMATIONSERVLET,                 request.getParameter(RequestUtil.PARAM_LANG), langFromCookie, null,                request.getHeader("Accept-Language"), "en");        HttpSession session = request.getSession(true);                request.setAttribute("bundle", bundle);                request.setAttribute("urlPrefix", config.get(RequestUtil.PROP_INFORMATION_URL_PREFIX));        String loginTicketId = request.getParameter("moriaID");        if (loginTicketId != null) {             Map userData = null;                        // FIXME: is it ok/safe to store userData in servlet            if (storedticket != null && storedticket.equals(loginTicketId)) {                userData = storedmap;            }            else {              try {                userData = MoriaController.getUserAttributes(loginTicketId, PRINCIPAL);              }               catch (IllegalInputException e) {                  log.logCritical("IllegalInputException in doGet()");              }              catch (UnknownTicketException e) {                  log.logCritical("UnknownTicketException in doGet()");                             }              catch (InoperableStateException e) {                  log.logCritical("InoperableStateException in doGet()");              }                            // FIXME: see comment above. Is this ok?              if (userData != null) {                  storedmap = userData;                  storedticket = loginTicketId;                                    // print some log info about userAttributes found                  log.logInfo("UserAttributes found ok...");                  for (Iterator it = userData.keySet().iterator(); it.hasNext();) {                     String key = (String) it.next();                     log.logInfo("Attribute: " + key);                  }              }            }            if (userData == null) {                // TODO: print error message instead of empty table?                userData = new HashMap();            }                        // need userorg as an attribute in the JSP to be able to print            // instructions on where to update the optional or mandatory info            String [] userorgarray = (String[]) userData.get(RequestUtil.EDU_ORG_LEGAL_NAME);            String userorg = "unknown userorg";            if (userorgarray != null && userorgarray.length > 0) {                userorg = userorgarray[0];            }            request.setAttribute("userorg", userorg);                                  Vector tabledata = printTableToVector(userData, bundle);            request.setAttribute("tabledata", tabledata);            /* Configured values */            request.setAttribute(RequestUtil.ATTR_ORGANIZATIONS, RequestUtil.parseConfig(config, RequestUtil.PROP_ORG, bundle.getLocale().getLanguage()));            request.setAttribute(RequestUtil.ATTR_LANGUAGES, RequestUtil.parseConfig(config, RequestUtil.PROP_LANGUAGE, RequestUtil.PROP_COMMON));            request.setAttribute(RequestUtil.ATTR_BASE_URL, config.getProperty(RequestUtil.PROP_INFORMATION_URL_PREFIX) + "?" + config.getProperty(RequestUtil.PROP_LOGIN_TICKET_PARAM) + "=" + loginTicketId);            request.setAttribute(RequestUtil.ATTR_SELECTED_LANG, bundle.getLocale());                        // update cookie if language has changed            if (request.getParameter(RequestUtil.PARAM_LANG) != null)                response.addCookie(RequestUtil.createCookie((String) config.get(RequestUtil.PROP_COOKIE_LANG), request.getParameter(RequestUtil.PARAM_LANG), new Integer((String) config.get(RequestUtil.PROP_COOKIE_LANG_TTL)).intValue()));            // print the table in the JSP            final RequestDispatcher rd = getServletContext().getNamedDispatcher("Information.JSP");            rd.forward(request, response);        }        else {            // call doPost() to get the user attributes from the Controller            doPost(request, response);        }    }