org.apache.wicket.Request.decodeURL()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(235)

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

Request.decodeURL介绍

[英]An implementation of this method is only required if a subclass wishes to support sessions via URL rewriting. This default implementation simply returns the URL String it is passed.
[中]仅当子类希望通过URL重写支持会话时,才需要实现此方法。这个默认实现只返回传递给它的URL字符串。

代码示例

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

  1. /**
  2. * Construct.
  3. *
  4. * @param realRequest
  5. * @param url
  6. */
  7. public FormDispatchRequest(final Request realRequest, final String url)
  8. {
  9. this.realRequest = realRequest;
  10. this.url = realRequest.decodeURL(url);
  11. String queryString = this.url.substring(this.url.indexOf("?") + 1);
  12. RequestUtils.decodeParameters(queryString, params);
  13. }

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

  1. /**
  2. * Decode the querystring of the URL
  3. *
  4. * @see org.apache.wicket.request.IRequestCodingStrategy#decode(org.apache.wicket.Request)
  5. */
  6. public RequestParameters decode(final Request request)
  7. {
  8. String url = request.decodeURL(request.getURL());
  9. String decodedQueryParams = decodeURL(url);
  10. if (decodedQueryParams != null)
  11. {
  12. // The difficulty now is that this.defaultStrategy.decode(request)
  13. // doesn't know the just decoded url which is why must create
  14. // a fake Request for.
  15. Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
  16. return defaultStrategy.decode(fakeRequest);
  17. }
  18. return defaultStrategy.decode(request);
  19. }

代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket

  1. /**
  2. * Decode the querystring of the URL
  3. *
  4. * @see org.apache.wicket.request.IRequestCodingStrategy#decode(org.apache.wicket.Request)
  5. */
  6. public RequestParameters decode(final Request request)
  7. {
  8. String url = request.decodeURL(request.getURL());
  9. String decodedQueryParams = decodeURL(url);
  10. if (decodedQueryParams != null)
  11. {
  12. // The difficulty now is that this.defaultStrategy.decode(request)
  13. // doesn't know the just decoded url which is why must create
  14. // a fake Request for.
  15. Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
  16. return defaultStrategy.decode(fakeRequest);
  17. }
  18. return defaultStrategy.decode(request);
  19. }

相关文章