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

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

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

HttpServletRequestWrapper.getAttribute介绍

暂无

代码示例

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. return super.getAttribute(name);
  4. }

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

  1. @Override
  2. @Nullable
  3. public Object getAttribute(String name) {
  4. if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
  5. (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
  6. this.webApplicationContext.containsBean(name)) {
  7. return this.webApplicationContext.getBean(name);
  8. }
  9. else {
  10. return super.getAttribute(name);
  11. }
  12. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. if ("isWrapped".equals(name)) {
  4. return Boolean.TRUE;
  5. }
  6. return super.getAttribute(name);
  7. }

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

  1. @Override
  2. @Nullable
  3. public Object getAttribute(String name) {
  4. if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
  5. (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
  6. this.webApplicationContext.containsBean(name)) {
  7. return this.webApplicationContext.getBean(name);
  8. }
  9. else {
  10. return super.getAttribute(name);
  11. }
  12. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. Object value = _attributes.get(name);
  4. if (value == _nullValue) {
  5. return null;
  6. }
  7. if (value != null) {
  8. return value;
  9. }
  10. return super.getAttribute(name);
  11. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
  4. return "true";
  5. }
  6. return super.getAttribute(name);
  7. }
  8. }

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

  1. /**
  2. * 返回这个窗口的私有属性或portal主控请求对象的共同属性
  3. *
  4. * @param name Name of the attribute to retrieve
  5. */
  6. public Object getAttribute(String name) {
  7. Object value = null;
  8. synchronized (mutex) {
  9. if (deleteAttributes != null && deleteAttributes.contains(name)) {
  10. return null;
  11. }
  12. value = window.get(name);
  13. if (value == null) {
  14. value = super.getAttribute(name);
  15. }
  16. }
  17. return value;
  18. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Object getAttribute(final String name) {
  6. // Synchronized access
  7. synchronized (mutex) {
  8. return super.getAttribute(name);
  9. }
  10. }

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

  1. @Override
  2. public Object getAttribute(final String name)
  3. {
  4. Object attribute = super.getAttribute(name);
  5. return attribute;
  6. }

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

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

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

  1. public Object getAttribute(String attributeName) {
  2. if (attributeName.equals(INCLUDE_SERVLET_PATH_ATTRIBUTE)) {
  3. return "";
  4. } else if (attributeName.equals(INCLUDE_PATH_INFO_ATTRIBUTE)) {
  5. String servletPath = (String) super.getAttribute(INCLUDE_SERVLET_PATH_ATTRIBUTE);
  6. return servletPath;
  7. }
  8. return super.getAttribute(attributeName);
  9. }
  10. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
  4. return "true";
  5. }
  6. return super.getAttribute(name);
  7. }
  8. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. if (AbstractHTTPDestination.SERVICE_REDIRECTION.equals(name)) {
  4. return "true";
  5. }
  6. return super.getAttribute(name);
  7. }
  8. }

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

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

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

  1. @Override
  2. @Nullable
  3. public Object getAttribute(String name) {
  4. if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
  5. (this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
  6. this.webApplicationContext.containsBean(name)) {
  7. return this.webApplicationContext.getBean(name);
  8. }
  9. else {
  10. return super.getAttribute(name);
  11. }
  12. }

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

  1. public Object getAttribute(String string) {
  2. if (string.equals(UPLOADED_FILES_ATTRIBUTE)) {
  3. return getFileItems();
  4. }
  5. return super.getAttribute(string);
  6. }

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

  1. @Override
  2. @SuppressWarnings("deprecation")
  3. public void removeAttribute(final String name) {
  4. if (Constants.HDIV_REQUEST_CONTEXT.equals(name)) {
  5. if (super.getAttribute(Constants.HDIV_REQUEST_CONTEXT) != null) {
  6. log.warn("The application is trying to remove an Hdiv internal attribute. The change will be avoided.");
  7. return;
  8. }
  9. }
  10. super.removeAttribute(name);
  11. }

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

  1. @Override
  2. public Object getAttribute(String name) {
  3. this.checkState();
  4. return super.getAttribute(name);
  5. }

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

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

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

  1. @Override
  2. public Object getAttribute(final String name) {
  3. if ( ResourceBundleProvider.BUNDLE_REQ_ATTR.equals(name) ) {
  4. if ( this.resourceBundle == null && this.bundleProvider != null) {
  5. this.resourceBundle = this.bundleProvider.getResourceBundle(this.getLocale());
  6. }
  7. return this.resourceBundle;
  8. }
  9. return super.getAttribute(name);
  10. }

相关文章

HttpServletRequestWrapper类方法