Example usage for javax.servlet.http HttpServletRequest setAttribute

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

Introduction

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

Prototype

public void setAttribute(String name, Object o);

Source Link

Document

Stores an attribute in this request.

Usage

From source file:com.ixcode.framework.model.lookup.LookupHandler.java

public static void setLookupCompleted(HttpServletRequest request) {
    request.setAttribute(REQUEST_ATTR_LOOKUP_COMPLETED, Boolean.TRUE);
}

From source file:com.ixcode.framework.model.lookup.LookupHandler.java

public static void setLookupCancelled(HttpServletRequest request) {
    request.setAttribute(REQUEST_ATTR_LOOKUP_CANCELLED, Boolean.TRUE);
}

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

/**
 *
 *//*ww  w  . j  a v  a  2 s  .c  om*/
public static void setLocalContentNodeCollectionName(HttpServletRequest req, String name) {
    req.setAttribute(Resource.LOCAL_CONTENT_NODE_COLLECTION_NAME, name);
}

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

/**
 * <p>/*from  www.  j  ava2 s.  c om*/
 * set ContentNode object in resources , scope:TAG
 * </p>
 * @param req HttpServletRequest as received in JSP or servlet
 * @param node to be set
 */
public static void setLocalContentNode(HttpServletRequest req, Content node) {
    req.setAttribute(Resource.LOCAL_CONTENT_NODE, node);
}

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

/**
 * <p>/*from w  w w .  ja va2s . co m*/
 * set ContentNode object in resources, scope:page
 * </p>
 * @param req HttpServletRequest as received in JSP or servlet
 * @param node to be set
 */
public static void setGlobalContentNode(HttpServletRequest req, Content node) {
    req.setAttribute(Resource.GLOBAL_CONTENT_NODE, node);
}

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

/**
 * Set the request's <code>actpage</code> attribute to <code>page</code>
 *//* w w w .  j a  v a 2  s  . c o  m*/
public static void setCurrentActivePage(HttpServletRequest request, Content page) {
    request.setAttribute(Aggregator.CURRENT_ACTPAGE, page);
}

From source file:net.sourceforge.fenixedu.presentationTier.Action.utils.RequestUtils.java

public static String getAndSetStringToRequest(HttpServletRequest request, String name) {
    String parameter = request.getParameter(name);
    if (parameter == null) {
        parameter = (String) request.getAttribute(name);
    }/*from  ww w  .  jav a 2  s .  c  om*/
    request.setAttribute(name, parameter);
    return parameter;
}

From source file:com.curl.orb.servlet.InstanceManagementUtil.java

/**
 * Set InstanceManagementResponse.//  ww w. j  a va 2  s  .  c  o  m
 */
public static void setResponse(HttpServletRequest httpRequest, Object responseData,
        Map<String, Object> subordinateData) {
    httpRequest.setAttribute(InstanceManagementServlet.RESPONSE_OBJECT, responseData);
    httpRequest.setAttribute(InstanceManagementServlet.RESPONSE_SUBORDINATE_OBJECT, subordinateData);
}

From source file:com.bstek.dorado.view.resolver.PageOutputUtils.java

private static OutputContext getOutputContext(HttpServletRequest request, Writer writer) {
    OutputContext outputContext = (OutputContext) request.getAttribute(OutputContext.class.getName());
    if (outputContext == null) {
        outputContext = new OutputContext(writer);
        request.setAttribute(OutputContext.class.getName(), outputContext);

        outputContext//from   ww  w  .  ja  v a2  s .  com
                .setShouldOutputDataTypes(WebConfigure.getBoolean("view.outputDataTypesInPageTemplate", true));
        outputContext.setUsePrettyJson(Configure.getBoolean("view.outputPrettyJson"));
    }
    return outputContext;
}

From source file:com.enonic.cms.web.portal.instanttrace.InstantTraceRequestInspector.java

public static void setAttributeOriginalUrl(final PathAndParams pathAndParams,
        final HttpServletRequest request) {
    final PathAndParamsToStringBuilder builder = new PathAndParamsToStringBuilder();
    builder.setIncludeFragment(true);/*from  ww w  .j  a  v a  2s  .  c  o  m*/
    builder.setIncludeParamsInPath(true);
    String originalUrl = builder.toString(pathAndParams);
    request.setAttribute("itrace.originalUrl", originalUrl);
}