/** * Create a new web session id and object. * * @param hostAddr the host address * @return the web session object */ WebSession createNewSession(String hostAddr) { String newId; do { newId = generateSessionId(); } while (sessions.get(newId) != null); WebSession session = new WebSession(this); session.lastAccess = System.currentTimeMillis(); session.put("sessionId", newId); session.put("ip", hostAddr); session.put("language", DEFAULT_LANGUAGE); session.put("frame-border", "0"); session.put("frameset-border", "4"); sessions.put(newId, session); // always read the english translation, // so that untranslated text appears at least in english readTranslations(session, DEFAULT_LANGUAGE); return getSession(newId); }
WebSession createNewSession(String hostAddr) { String newId; do { newId = generateSessionId(); } while(sessions.get(newId) != null); WebSession session = new WebSession(this); session.put("sessionId", newId); session.put("ip", hostAddr); session.put("language", DEFAULT_LANGUAGE); sessions.put(newId, session); // always read the english translation, // to that untranslated text appears at least in english readTranslations(session, DEFAULT_LANGUAGE); return getSession(newId); }
/** * Create a new web session id and object. * * @param hostAddr the host address * @return the web session object */ WebSession createNewSession(String hostAddr) { String newId; do { newId = generateSessionId(); } while (sessions.get(newId) != null); WebSession session = new WebSession(this); session.lastAccess = System.currentTimeMillis(); session.put("sessionId", newId); session.put("ip", hostAddr); session.put("language", DEFAULT_LANGUAGE); session.put("frame-border", "0"); session.put("frameset-border", "4"); sessions.put(newId, session); // always read the english translation, // so that untranslated text appears at least in english readTranslations(session, DEFAULT_LANGUAGE); return getSession(newId); }
/** * Create a new web session id and object. * * @param hostAddr the host address * @return the web session object */ WebSession createNewSession(String hostAddr) { String newId; do { newId = generateSessionId(); } while (sessions.get(newId) != null); WebSession session = new WebSession(this); session.lastAccess = System.currentTimeMillis(); session.put("sessionId", newId); session.put("ip", hostAddr); session.put("language", DEFAULT_LANGUAGE); session.put("frame-border", "0"); session.put("frameset-border", "4"); sessions.put(newId, session); // always read the english translation, // so that untranslated text appears at least in english readTranslations(session, DEFAULT_LANGUAGE); return getSession(newId); }