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

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

本文整理了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

/**
 * Construct.
 * 
 * @param realRequest
 * @param url
 */
public FormDispatchRequest(final Request realRequest, final String url)
{
  this.realRequest = realRequest;
  this.url = realRequest.decodeURL(url);
  String queryString = this.url.substring(this.url.indexOf("?") + 1);
  RequestUtils.decodeParameters(queryString, params);
}

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

/**
 * Decode the querystring of the URL
 * 
 * @see org.apache.wicket.request.IRequestCodingStrategy#decode(org.apache.wicket.Request)
 */
public RequestParameters decode(final Request request)
{
  String url = request.decodeURL(request.getURL());
  String decodedQueryParams = decodeURL(url);
  if (decodedQueryParams != null)
  {
    // The difficulty now is that this.defaultStrategy.decode(request)
    // doesn't know the just decoded url which is why must create
    // a fake Request for.
    Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
    return defaultStrategy.decode(fakeRequest);
  }
  return defaultStrategy.decode(request);
}

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

/**
 * Decode the querystring of the URL
 * 
 * @see org.apache.wicket.request.IRequestCodingStrategy#decode(org.apache.wicket.Request)
 */
public RequestParameters decode(final Request request)
{
  String url = request.decodeURL(request.getURL());
  String decodedQueryParams = decodeURL(url);
  if (decodedQueryParams != null)
  {
    // The difficulty now is that this.defaultStrategy.decode(request)
    // doesn't know the just decoded url which is why must create
    // a fake Request for.
    Request fakeRequest = new DecodedUrlRequest(request, url, decodedQueryParams);
    return defaultStrategy.decode(fakeRequest);
  }
  return defaultStrategy.decode(request);
}

相关文章