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

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

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

HttpServletRequestWrapper.getPathInfo介绍

[英]The default behavior of this method is to return getPathInfo() on the wrapped request object.
[中]此方法的默认行为是在包装的请求对象上返回getPathInfo()。

代码示例

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

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

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

  1. @Override
  2. public String getPathInfo() {
  3. if (pathInfo == null) {
  4. pathInfo = super.getPathInfo();
  5. if (pathInfo == null) {
  6. pathInfo = getRequestURI();
  7. }
  8. String prefix = super.getContextPath() + this.getServletPath();
  9. if (pathInfo.startsWith(prefix)) {
  10. pathInfo = pathInfo.substring(prefix.length());
  11. }
  12. }
  13. return pathInfo;
  14. }
  15. }

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

  1. @Override
  2. public String getPathInfo()
  3. {
  4. String pathInfo = super.getPathInfo();
  5. return pathInfo;
  6. }

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

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

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.servlet

  1. public String getPathInfo()
  2. {
  3. if (_included)
  4. return super.getPathInfo();
  5. return _pathInfo;
  6. }

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

  1. public String getPathInfo()
  2. {
  3. if (_included)
  4. return super.getPathInfo();
  5. return _pathInfo;
  6. }

代码示例来源:origin: org.seasar.kvasir.cms/org.seasar.kvasir.cms

  1. public String getPathInfo()
  2. {
  3. if (activated_) {
  4. return pathInfo_;
  5. } else {
  6. return super.getPathInfo();
  7. }
  8. }

代码示例来源:origin: com.v5analytics.webster/webster

  1. @Override
  2. public String getPathInfo() {
  3. if (pathInfo == null) {
  4. return super.getPathInfo();
  5. } else {
  6. return pathInfo;
  7. }
  8. }
  9. };

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

  1. public String getPathInfo()
  2. {
  3. if (_included)
  4. return super.getPathInfo();
  5. return _pathInfo;
  6. }

代码示例来源:origin: org.apache.portals.jetspeed-2/jetspeed-portal

  1. @Override
  2. public String getPathInfo()
  3. {
  4. return (pathInfo != null ? pathInfo : super.getPathInfo());
  5. }
  6. }

代码示例来源:origin: jenkinsci/winstone

  1. @Override
  2. public String getPathInfo()
  3. {
  4. if (_included)
  5. return super.getPathInfo();
  6. return _pathInfo;
  7. }

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

  1. public String getPathInfo()
  2. {
  3. if (_included)
  4. return super.getPathInfo();
  5. return _pathInfo;
  6. }

代码示例来源:origin: org.seleniumhq.selenium.server/selenium-server-coreless

  1. public String getPathInfo()
  2. {
  3. if (_included)
  4. return super.getPathInfo();
  5. return _pathInfo;
  6. }

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

  1. @Override
  2. public String getPathInfo()
  3. {
  4. if ( this.isInclusionDispatcher() )
  5. {
  6. return super.getPathInfo();
  7. }
  8. return this.requestInfo.pathInfo;
  9. }

代码示例来源:origin: com.vaadin/vaadin-spring

  1. @Override
  2. public String getServletPath() {
  3. String pathInfo = super.getPathInfo();
  4. if (pathInfo == null) {
  5. // the path where a ServletForwardingController is registered is not
  6. // a real servlet path
  7. return "";
  8. } else {
  9. return super.getServletPath();
  10. }
  11. }

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

  1. public String getPathInfo()
  2. {
  3. if (getAttribute(NATIVE_URL) != null) return super.getPathInfo();
  4. return m_path;
  5. }

代码示例来源:origin: org.apache.felix/org.apache.felix.http.base

  1. @Override
  2. public String getPathInfo()
  3. {
  4. if ( this.isInclusionDispatcher() )
  5. {
  6. return super.getPathInfo();
  7. }
  8. return this.requestInfo.pathInfo;
  9. }

代码示例来源:origin: com.vaadin/vaadin-spring

  1. @Override
  2. public String getPathInfo() {
  3. String pathInfo = super.getPathInfo();
  4. if (pathInfo == null) {
  5. // this uses getServletPath() and should work both with and without
  6. // clearServletPath
  7. pathInfo = urlPathHelper.getPathWithinServletMapping(this);
  8. }
  9. return pathInfo;
  10. }
  11. }

代码示例来源:origin: org.jvnet.hudson.winstone/winstone

  1. public String getPathInfo() {
  2. if (hasBeenForwarded()) {
  3. return super.getPathInfo();
  4. } else {
  5. return this.oldRequest.getPathInfo();
  6. }
  7. }

代码示例来源:origin: info.magnolia/magnolia-core

  1. @Override
  2. public Void answer(InvocationOnMock invocation) throws Throwable {
  3. Object[] args = invocation.getArguments();
  4. final HttpServletRequestWrapper requestWrapper = (HttpServletRequestWrapper) args[0];
  5. final String pathInfo = requestWrapper.getPathInfo();
  6. final String servletPath = requestWrapper.getServletPath();
  7. assertEquals("pathInfo does not match", expectedPathInfo, pathInfo);
  8. assertEquals("servletPath does not match", expectedServletPath, servletPath);
  9. return null;
  10. }
  11. }).when(servlet).service(any(HttpServletRequestWrapper.class), same(res));

相关文章

HttpServletRequestWrapper类方法