javax.servlet.http.HttpServletRequestWrapper.getAttribute()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(191)

本文整理了Java中javax.servlet.http.HttpServletRequestWrapper.getAttribute()方法的一些代码示例,展示了HttpServletRequestWrapper.getAttribute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpServletRequestWrapper.getAttribute()方法的具体详情如下:
包路径:javax.servlet.http.HttpServletRequestWrapper
类名称:HttpServletRequestWrapper
方法名:getAttribute

HttpServletRequestWrapper.getAttribute介绍

暂无

代码示例

代码示例来源:origin: cloudfoundry/uaa

@Override
public Object getAttribute(String name) {
  return super.getAttribute(name);
}

代码示例来源:origin: spring-projects/spring-framework

@Override
@Nullable
public Object getAttribute(String name) {
  if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
      (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
      this.webApplicationContext.containsBean(name)) {
    return this.webApplicationContext.getBean(name);
  }
  else {
    return super.getAttribute(name);
  }
}

代码示例来源:origin: javaee-samples/javaee7-samples

@Override
public Object getAttribute(String name) {
  if ("isWrapped".equals(name)) {
    return Boolean.TRUE;
  }
  return super.getAttribute(name);
}

代码示例来源:origin: org.springframework/spring-web

@Override
@Nullable
public Object getAttribute(String name) {
  if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
      (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
      this.webApplicationContext.containsBean(name)) {
    return this.webApplicationContext.getBean(name);
  }
  else {
    return super.getAttribute(name);
  }
}

代码示例来源:origin: com.liferay.portal/com.liferay.portal.kernel

@Override
public Object getAttribute(String name) {
  Object value = _attributes.get(name);
  if (value == _nullValue) {
    return null;
  }
  if (value != null) {
    return value;
  }
  return super.getAttribute(name);
}

代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http

@Override
  public Object getAttribute(String name) {
    if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
      return "true";
    }
    return super.getAttribute(name);
  }
}

代码示例来源:origin: paoding-code/paoding-rose

/**
 * 返回这个窗口的私有属性或portal主控请求对象的共同属性
 * 
 * @param name Name of the attribute to retrieve
 */
public Object getAttribute(String name) {
  Object value = null;
  synchronized (mutex) {
    if (deleteAttributes != null && deleteAttributes.contains(name)) {
      return null;
    }
    value = window.get(name);
    if (value == null) {
      value = super.getAttribute(name);
    }
  }
  return value;
}

代码示例来源:origin: com.github.wuic/wuic-servlet

/**
 * {@inheritDoc}
 */
@Override
public Object getAttribute(final String name) {
  // Synchronized access
  synchronized (mutex) {
    return super.getAttribute(name);
  }
}

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public Object getAttribute(final String name)
{
  Object attribute = super.getAttribute(name);
  return attribute;
}

代码示例来源:origin: org.apache.juneau/juneau-rest-server

/**
 * Same as {@link #getAttribute(String)} but returns a default value if not found.
 *
 * @param name The request attribute name.
 * @param def The default value if the attribute doesn't exist.
 * @return The request attribute value.
 */
public Object getAttribute(String name, Object def) {
  Object o = super.getAttribute(name);
  return (o == null ? def : o);
}

代码示例来源:origin: org.wso2.carbon/org.wso2.carbon.bridge

public Object getAttribute(String attributeName) {
    if (attributeName.equals(INCLUDE_SERVLET_PATH_ATTRIBUTE)) {
      return "";
    } else if (attributeName.equals(INCLUDE_PATH_INFO_ATTRIBUTE)) {
      String servletPath = (String) super.getAttribute(INCLUDE_SERVLET_PATH_ATTRIBUTE);
      return servletPath;
    }
    return super.getAttribute(attributeName);
  }
}

代码示例来源:origin: apache/cxf

@Override
  public Object getAttribute(String name) {
    if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
      return "true";
    }
    return super.getAttribute(name);
  }
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

@Override
  public Object getAttribute(String name) {
    if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
      return "true";
    }
    return super.getAttribute(name);
  }
}

代码示例来源:origin: com.liferay.faces/liferay-faces-portal

@Override
public Object getAttribute(String name) {
  if (AUI_FORM_USE_NAMESPACE.equals(name)) {
    // Note: The portal-web/docroot/html/taglib/init.jsp file asks the value of this attribute. Need to return
    // false in order to ensure that the portlet namespace is not prepended to method names and element ids.
    return Boolean.FALSE.toString();
  }
  else {
    return super.getAttribute(name);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
@Nullable
public Object getAttribute(String name) {
  if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
      (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
      this.webApplicationContext.containsBean(name)) {
    return this.webApplicationContext.getBean(name);
  }
  else {
    return super.getAttribute(name);
  }
}

代码示例来源:origin: org.apache.myfaces.tomahawk/tomahawk

public Object getAttribute(String string) {
  if (string.equals(UPLOADED_FILES_ATTRIBUTE)) {
    return getFileItems();
  }
  return super.getAttribute(string);
}

代码示例来源:origin: hdiv/hdiv

@Override
@SuppressWarnings("deprecation")
public void removeAttribute(final String name) {
  if (Constants.HDIV_REQUEST_CONTEXT.equals(name)) {
    if (super.getAttribute(Constants.HDIV_REQUEST_CONTEXT) != null) {
      log.warn("The application is trying to remove an Hdiv internal attribute. The change will be avoided.");
      return;
    }
  }
  super.removeAttribute(name);
}

代码示例来源:origin: Jasig/uPortal

@Override
public Object getAttribute(String name) {
  this.checkState();
  return super.getAttribute(name);
}

代码示例来源:origin: hdiv/hdiv

@Override
@SuppressWarnings("deprecation")
public void setAttribute(final String name, final Object o) {
  if (Constants.HDIV_REQUEST_CONTEXT.equals(name)) {
    if (super.getAttribute(Constants.HDIV_REQUEST_CONTEXT) != null) {
      log.warn("The application is trying to modify an Hdiv internal attribute. The change will be avoided.");
      return;
    }
  }
  super.setAttribute(name, o);
}

代码示例来源:origin: org.apache.sling/org.apache.sling.i18n

@Override
public Object getAttribute(final String name) {
  if ( ResourceBundleProvider.BUNDLE_REQ_ATTR.equals(name) ) {
    if ( this.resourceBundle == null && this.bundleProvider != null) {
      this.resourceBundle = this.bundleProvider.getResourceBundle(this.getLocale());
    }
    return this.resourceBundle;
  }
  return super.getAttribute(name);
}

相关文章

HttpServletRequestWrapper类方法