@Override protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception { String sid = ServletRequestUtils.getStringParameter(request, "sid"); String attrName = ServletRequestUtils.getStringParameter(request, "attr"); Session session = context.getManager().findSession(sid); if (session != null) { session.getSession().removeAttribute(attrName); } return new ModelAndView(new RedirectView( request.getContextPath() + getViewName() + "?" + request.getQueryString())); }
long size = 0; HttpSession httpSession = session.getSession(); Set<Object> processedObjects = new HashSet<>(1000);
protected void cleanSession(Session catalinaSession) { catalinaSession.getSession().removeAttribute(KeycloakSecurityContext.class.getName()); catalinaSession.getSession().removeAttribute(SerializableKeycloakAccount.class.getName()); catalinaSession.getSession().removeAttribute(OidcKeycloakAccount.class.getName()); catalinaSession.setPrincipal(null); catalinaSession.setAuthType(null); }
@Override public Comparable<Boolean> getComparableObject(Session session) { return Boolean.valueOf(session.getSession().isNew()); } };
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session The session * @return the locale */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
/** * @return the session associated with this Request, creating one * if necessary. */ @Override public HttpSession getSession() { Session session = doGetSession(true); if (session == null) { return null; } return session.getSession(); }
/** * Return the session associated with this Request, creating one * if necessary. */ @Override public HttpSession getSession() { Session session = doGetSession(true); if (session == null) { return null; } return session.getSession(); }
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
@Override public Comparable<Boolean> getComparableObject(Session session) { return Boolean.valueOf(session.getSession().isNew()); } };
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
/** * Return the session associated with this Request, creating one * if necessary. */ public HttpSession getSession() { Session session = doGetSession(true); if (session != null) { return session.getSession(); } else { return null; } }
protected HttpSession getSession(boolean create) { Session session = request.getSessionInternal(create); if (session == null) return null; return session.getSession(); } }
/** * Return the session associated with this Request, creating one * if necessary. */ public HttpSession getSession() { Session session = doGetSession(true); if (session != null) { return session.getSession(); } else { return null; } }
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
@Override public Comparable<Boolean> getComparableObject(Session session) { return Boolean.valueOf(session.getSession().isNew()); } };
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session The session * @return the locale */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
/** * Return the session associated with this Request, creating one * if necessary. */ @Override public HttpSession getSession() { Session session = doGetSession(true); if (session == null) { return null; } return session.getSession(); }
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {
/** * Try to get user locale from the session, if possible. * IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring * JSF check the browser meta tag "accept languages" to choose what language to display. * @param in_session * @return String */ public static Locale guessLocaleFromSession(final Session in_session) { return guessLocaleFromSession(in_session.getSession()); } public static Locale guessLocaleFromSession(final HttpSession in_session) {