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

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

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

HttpServletRequestWrapper.getServletPath介绍

[英]The default behavior of this method is to return getServletPath() on the wrapped request object.
[中]

代码示例

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

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

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

  1. wrapper.getRequestDispatcher(wrapper.getServletPath()).forward(wrapper, response);
  2. return true;

代码示例来源:origin: com.google.inject.extensions/guice-servlet

  1. private String computePath() {
  2. if (!isPathComputed()) {
  3. String servletPath = super.getServletPath();
  4. path = patternMatcher.extractPath(servletPath);
  5. pathComputed = true;
  6. if (null == path) {
  7. path = servletPath;
  8. }
  9. }
  10. return path;
  11. }
  12. };

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

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

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

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

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

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

代码示例来源:origin: org.gosu-lang.gosu.managed/gw-jetty

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

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

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

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

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

代码示例来源:origin: com.uwyn/jhighlight

  1. public String getServletPath()
  2. {
  3. String path = super.getServletPath();
  4. return path.substring(0, path.length() - 1);
  5. }

代码示例来源:origin: org.codelibs/jhighlight

  1. public String getServletPath()
  2. {
  3. String path = super.getServletPath();
  4. return path.substring(0, path.length() - 1);
  5. }

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

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

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

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

代码示例来源:origin: org.jasig.portal/uPortal-rendering

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

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

  1. @Override /* HttpServletRequest */
  2. public String getServletPath() {
  3. String cp = context.getUriContext();
  4. String sp = super.getServletPath();
  5. return cp == null || ! sp.startsWith(cp) ? sp : sp.substring(cp.length());
  6. }

代码示例来源: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.apache.juneau/juneau-rest-server

  1. @Override /* HttpServletRequest */
  2. public String getServletPath() {
  3. String cp = context.getUriContext();
  4. String sp = super.getServletPath();
  5. return cp == null || ! sp.startsWith(cp) ? sp : sp.substring(cp.length());
  6. }

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

  1. @Override
  2. public String getPathInfo() {
  3. String path = super.getServletPath();
  4. if (path.length() == 0) {
  5. path = super.getPathInfo();
  6. }
  7. // TODO: another context path hack, revisit when context path is sorted out
  8. path = fiddlePath(path, servletPath);
  9. return path;
  10. }
  11. };

代码示例来源:origin: org.sonatype.sisu.inject/guice-servlet

  1. private String computePath() {
  2. if (!isPathComputed()) {
  3. String servletPath = super.getServletPath();
  4. path = patternMatcher.extractPath(servletPath);
  5. pathComputed = true;
  6. if (null == path) {
  7. path = servletPath;
  8. }
  9. }
  10. return path;
  11. }
  12. };

代码示例来源: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类方法