Package javax.servlet.http

Examples of javax.servlet.http.HttpServletRequest.removeAttribute()


                                 wrapper.getName()), rootCause);
            }
            throwable = e;
            exception(request, response, e);
        } catch (Throwable e) {
            hreq.removeAttribute(Globals.JSP_FILE_ATTR);
            log(sm.getString("standardWrapper.serviceException",
                             wrapper.getName()), e);
            throwable = e;
            exception(request, response, e);
        }
View Full Code Here


        } finally {
            SecurityContext contextAfterChainExecution = SecurityContextHolder.getContext();
            // Crucial removal of SecurityContextHolder contents - do this before anything else.
            SecurityContextHolder.clearContext();
            repo.saveContext(contextAfterChainExecution, holder.getRequest(), holder.getResponse());
            request.removeAttribute(FILTER_APPLIED);

            if (debug) {
                logger.debug("SecurityContextHolder now cleared, as request processing completed");
            }
        }
View Full Code Here

    Set<Entry<String, Object>> set = cacheData.entrySet();
    for (Iterator<Entry<String, Object>> it=set.iterator(); it.hasNext();) {
      Entry<String, Object> entry = it.next();
      request.setAttribute(entry.getKey(), entry.getValue());
    }
    request.removeAttribute(renderKey);
   
    controller.render((Render)cacheData.get(renderKey));    // set render from cacheData
  }
}
View Full Code Here

        {
            HttpSessionBindingEvent event = new SessionBindingEvent( request.getSession(), attrName, currentValue );
            ( ( HttpSessionBindingListener ) currentValue ).valueUnbound( event );
        }
       
        request.removeAttribute( attrName );
        getChangedAttributesList( request, true, false ).add( attrName );
       
        HashMap failoverAttrs = getFailoverAttributesMap( request, false, false );
        if ( failoverAttrs != null ) failoverAttrs.remove( attrName );
    }
View Full Code Here

                        finally
                        {
                            _isCommittingChanges.set( Boolean.FALSE );
                        }
                       
                        request.removeAttribute( attrName );
                    }
                }
                else
                {
                    //
View Full Code Here

                            parentCharArrayWriter.flush();
                            parentCharArrayWriter.writeTo(writer);
                        }
                    } finally {
                        if (isTopTemplate && parentCharArrayWriter != null) {
                            req.removeAttribute(PARENT_TEMPLATE_WRITER);
                            parentCharArrayWriter.close();
                        }
                    }
                } else {
                    template.process(model, writer);
View Full Code Here

                      }
                      return null;
                    } else if (mn.equals("removeAttribute")) {
                      Object av = hreq
                          .getAttribute((String) args[0]);
                      hreq.removeAttribute((String) args[0]);
                      ServletRequestAttributeEvent e = new ServletRequestAttributeEvent(
                          WebAppServlet.this, hreq,
                          (String) args[0], av);
                      for (ServletRequestAttributeListener sarl : attributeListeners)
                        sarl.attributeRemoved(e);
View Full Code Here

    public void testSetAttributeToNull()
    {
        MockControl control = newControl(HttpServletRequest.class);
        HttpServletRequest request = (HttpServletRequest) control.getMock();

        request.removeAttribute("tonull");

        HttpServletResponse response = newResponse();

        replayControls();
View Full Code Here

            if (forwardPage.getFormat() == null) {
                forwardPage.setFormat(configService.createFormat());
            }

            request.removeAttribute(FORWARD_PAGE);

            return forwardPage;
        }

        Class<? extends Page> pageClass = configService.getPageClass(path);
View Full Code Here

            storeSessionId(sessionId, request, response);
        } else {
            log.debug("Session ID cookie is disabled.  No cookie has been set for new session with id {}", session.getId());
        }

        request.removeAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_SOURCE);
        request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_IS_NEW, Boolean.TRUE);
    }

    @Override
    public Serializable getSessionId(SessionKey key) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.