Example usage for javax.servlet.http HttpServletRequest removeAttribute

List of usage examples for javax.servlet.http HttpServletRequest removeAttribute

Introduction

In this page you can find the example usage for javax.servlet.http HttpServletRequest removeAttribute.

Prototype

public void removeAttribute(String name);

Source Link

Document

Removes an attribute from this request.

Usage

From source file:com.vko.core.web.filter.InvocationUtils.java

public static void unbindInvocationFromRequest(HttpServletRequest request) {
    request.removeAttribute(CoreFilter.INVOCATION_KEY);
}

From source file:org.craftercms.security.utils.SecurityUtils.java

/**
 * Removes the authentication attribute from the specified request.
 *
 * @param request the request where to remove the attribute from
 *//*  w w w  . j  a v a2  s  .co m*/
public static void removeAuthentication(HttpServletRequest request) {
    request.removeAttribute(AUTHENTICATION_REQUEST_ATTRIBUTE_NAME);
}

From source file:org.itracker.web.servlets.GenericController.java

protected static void saveMessages(HttpServletRequest request, ActionErrors errors) {

    if ((errors == null) || errors.isEmpty()) {
        request.removeAttribute(Globals.ERROR_KEY);
        return;/*from w  ww . j  a va 2 s . c o  m*/
    }
    request.setAttribute(Globals.ERROR_KEY, errors);
}

From source file:info.magnolia.cms.util.Resource.java

/**
 * <p>/*from   w w  w.  j  ava2 s  .c  o m*/
 * removes ContentNode object in resources , scope:TAG
 * </p>
 * @param req HttpServletRequest as received in JSP or servlet
 */
public static void removeLocalContentNode(HttpServletRequest req) {
    req.removeAttribute(Resource.LOCAL_CONTENT_NODE);
}

From source file:info.magnolia.cms.util.Resource.java

/**
 * <p>/*www  . ja v  a 2  s .c  om*/
 * removes ContentNode object in resources , scope:page
 * </p>
 * @param req HttpServletRequest as received in JSP or servlet
 */
public static void removeGlobalContentNode(HttpServletRequest req) {
    req.removeAttribute(Resource.GLOBAL_CONTENT_NODE);
}

From source file:info.magnolia.cms.util.Resource.java

/**
 *
 *//* w w  w.  ja v  a2 s . c o  m*/
public static void removeLocalContentNodeCollectionName(HttpServletRequest req) {
    req.removeAttribute(Resource.LOCAL_CONTENT_NODE_COLLECTION_NAME);
}

From source file:de.ifgi.fmt.web.filter.auth.Authorization.java

/**
 * /*from   www .  j  a  va2  s  .c o m*/
 * @param cr
 * @param sr
 */
public static void deauth(ContainerRequest cr, HttpServletRequest sr) {
    if (sr != null) {
        sr.removeAttribute(USER_SESSION_ATTRIBUTE);
        sr.setAttribute(REMOVE_COOKIE_SESSION_ATTRIBUTE, new Boolean(true));
    }
    if (cr != null) {
        cr.setSecurityContext(new FmtSecurityContext(null));
    }
}

From source file:com.jdon.strutsutil.FormBeanUtil.java

/**
 * ?attributeActionForm/*from  www.  java  2s .  c  om*/
 * 
 * @param mapping
 * @param request
 */
public static void removeActionForm(ActionMapping mapping, HttpServletRequest request) {
    if (mapping.getAttribute() != null) {
        if ("request".equals(mapping.getScope()))
            request.removeAttribute(mapping.getAttribute());
        else {
            HttpSession session = request.getSession();
            session.removeAttribute(mapping.getAttribute());
            request.removeAttribute(mapping.getAttribute());
        }
    }
}

From source file:org.directwebremoting.dwrp.JettyContinuationSleeper.java

/**
 * Act on a restarted continuation by executing the onAwakening action
 * @param request The request on which the Sleeper is stored
 *///w ww. j a va 2s.c o  m
public static void restart(HttpServletRequest request) {
    JettyContinuationSleeper sleeper = (JettyContinuationSleeper) request.getAttribute(ATTRIBUTE_JETTY_CONDUIT);
    if (sleeper == null) {
        throw new IllegalStateException("No JettyContinuationSleeper in HttpServletRequest");
    }

    request.removeAttribute(ATTRIBUTE_JETTY_CONDUIT);
    sleeper.onAwakening.run();
}

From source file:org.directwebremoting.server.jetty.JettyContinuationSleeper.java

/**
 * Act on a restarted continuation by executing the onAwakening action
 * @param request The request on which the Sleeper is stored
 *///from   ww  w . j  av  a2  s .c o m
public static void restart(HttpServletRequest request) {
    JettyContinuationSleeper sleeper = getSleeper(request);
    if (sleeper == null) {
        throw new IllegalStateException("No JettyContinuationSleeper in HttpServletRequest");
    }
    request.removeAttribute(ATTRIBUTE_CONDUIT);
    sleeper.onAwakening.run();
}