当前位置: 首页>>代码示例>>Java>>正文


Java RequestUtil.URLDecode方法代码示例

本文整理汇总了Java中org.apache.catalina.util.RequestUtil.URLDecode方法的典型用法代码示例。如果您正苦于以下问题:Java RequestUtil.URLDecode方法的具体用法?Java RequestUtil.URLDecode怎么用?Java RequestUtil.URLDecode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.catalina.util.RequestUtil的用法示例。


在下文中一共展示了RequestUtil.URLDecode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Add a URL pattern to be part of this web resource collection.
 */
public void addPattern(String pattern) {

    if (pattern == null)
        return;

    String decodedPattern = RequestUtil.URLDecode(pattern);
    String results[] = new String[patterns.length + 1];
    for (int i = 0; i < patterns.length; i++) {
        results[i] = patterns[i];
    }
    results[patterns.length] = decodedPattern;
    patterns = results;

}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:SecurityCollection.java

示例2: setLocation

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Set the location.
 *
 * @param location The new location
 */
public void setLocation(String location) {

    //        if ((location == null) || !location.startsWith("/"))
    //            throw new IllegalArgumentException
    //                ("Error Page Location must start with a '/'");
    this.location = RequestUtil.URLDecode(location);

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:ErrorPage.java

示例3: addURLPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void addURLPattern(String urlPattern) {
    if ("*".equals(urlPattern)) {
        this.matchAllUrlPatterns = true;
    } else {
        String[] results = new String[urlPatterns.length + 1];
        System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);
        results[urlPatterns.length] = RequestUtil.URLDecode(urlPattern);
        urlPatterns = results;
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:FilterMap.java

示例4: addPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Add a URL pattern to be part of this web resource collection.
 */
public void addPattern(String pattern) {

    if (pattern == null)
        return;

    pattern = RequestUtil.URLDecode(pattern);
    String results[] = new String[patterns.length + 1];
    for (int i = 0; i < patterns.length; i++) {
        results[i] = patterns[i];
    }
    results[patterns.length] = pattern;
    patterns = results;

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:SecurityCollection.java

示例5: setLocation

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Set the location.
 *
 * @param location
 *            The new location
 */
public void setLocation(String location) {

	// if ((location == null) || !location.startsWith("/"))
	// throw new IllegalArgumentException
	// ("Error Page Location must start with a '/'");
	this.location = RequestUtil.URLDecode(location);

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:15,代码来源:ErrorPage.java

示例6: addURLPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void addURLPattern(String urlPattern) {
	if ("*".equals(urlPattern)) {
		this.matchAllUrlPatterns = true;
	} else {
		String[] results = new String[urlPatterns.length + 1];
		System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);
		results[urlPatterns.length] = RequestUtil.URLDecode(urlPattern);
		urlPatterns = results;
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:11,代码来源:FilterMap.java

示例7: addPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Add a URL pattern to be part of this web resource collection.
 */
public void addPattern(String pattern) {

    if (pattern == null)
        return;
    pattern = RequestUtil.URLDecode(pattern);
    String results[] = new String[patterns.length + 1];
    for (int i = 0; i < patterns.length; i++)
        results[i] = patterns[i];
    results[patterns.length] = pattern;
    patterns = results;

}
 
开发者ID:c-rainstorm,项目名称:jerrydog,代码行数:16,代码来源:SecurityCollection.java

示例8: addPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Add a URL pattern to be part of this web resource collection.
 */
public void addPattern(String pattern) {

	if (pattern == null)
		return;

	String decodedPattern = RequestUtil.URLDecode(pattern);
	String results[] = new String[patterns.length + 1];
	for (int i = 0; i < patterns.length; i++) {
		results[i] = patterns[i];
	}
	results[patterns.length] = decodedPattern;
	patterns = results;

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:18,代码来源:SecurityCollection.java

示例9: getContextPath

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Return the portion of the request URI used to select the Context
 * of the Request. The value returned is not decoded which also implies it
 * is not normalised.
 */
@Override
public String getContextPath() {
    String canonicalContextPath = getServletContext().getContextPath();
    String uri = getRequestURI();
    char[] uriChars = uri.toCharArray();
    int lastSlash = mappingData.contextSlashCount;
    // Special case handling for the root context
    if (lastSlash == 0) {
        return "";
    }
    int pos = 0;
    // Need at least the number of slashes in the context path
    while (lastSlash > 0) {
        pos = nextSlash(uriChars, pos + 1);
        if (pos == -1) {
            break;
        }
        lastSlash--;
    }
    // Now allow for path parameters, normalization and/or encoding.
    // Essentially, keep extending the candidate path up to the next slash
    // until the decoded and normalized candidate path (with the path
    // parameters removed) is the same as the canonical path.
    String candidate;
    if (pos == -1) {
        candidate = uri;
    } else {
        candidate = uri.substring(0, pos);
    }
    candidate = removePathParameters(candidate);
    candidate = RequestUtil.URLDecode(candidate, connector.getURIEncoding());
    candidate = org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
    boolean match = canonicalContextPath.equals(candidate);
    while (!match && pos != -1) {
        pos = nextSlash(uriChars, pos + 1);
        if (pos == -1) {
            candidate = uri;
        } else {
            candidate = uri.substring(0, pos);
        }
        candidate = removePathParameters(candidate);
        candidate = RequestUtil.URLDecode(candidate, connector.getURIEncoding());
        candidate = org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
        match = canonicalContextPath.equals(candidate);
    }
    if (match) {
        if (pos == -1) {
            return uri;
        } else {
            return uri.substring(0, pos);
        }
    } else {
        // Should never happen
        throw new IllegalStateException(sm.getString(
                "coyoteRequest.getContextPath.ise", canonicalContextPath, uri));
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:63,代码来源:Request.java

示例10: setLoginPage

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void setLoginPage(String loginPage) {
    //        if ((loginPage == null) || !loginPage.startsWith("/"))
    //            throw new IllegalArgumentException
    //                ("Login Page resource path must start with a '/'");
    this.loginPage = RequestUtil.URLDecode(loginPage);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:7,代码来源:LoginConfig.java

示例11: setErrorPage

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void setErrorPage(String errorPage) {
    //        if ((errorPage == null) || !errorPage.startsWith("/"))
    //            throw new IllegalArgumentException
    //                ("Error Page resource path must start with a '/'");
    this.errorPage = RequestUtil.URLDecode(errorPage);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:LoginConfig.java

示例12: setErrorPage

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void setErrorPage(String errorPage) {
	// if ((errorPage == null) || !errorPage.startsWith("/"))
	// throw new IllegalArgumentException
	// ("Error Page resource path must start with a '/'");
	this.errorPage = RequestUtil.URLDecode(errorPage);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:7,代码来源:LoginConfig.java

示例13: getContextPath

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
/**
 * Return the portion of the request URI used to select the Context of the
 * Request. The value returned is not decoded which also implies it is not
 * normalised.
 */
@Override
public String getContextPath() {
	String canonicalContextPath = getServletContext().getContextPath();
	String uri = getRequestURI();
	char[] uriChars = uri.toCharArray();
	int lastSlash = mappingData.contextSlashCount;
	// Special case handling for the root context
	if (lastSlash == 0) {
		return "";
	}
	int pos = 0;
	// Need at least the number of slashes in the context path
	while (lastSlash > 0) {
		pos = nextSlash(uriChars, pos + 1);
		if (pos == -1) {
			break;
		}
		lastSlash--;
	}
	// Now allow for path parameters, normalization and/or encoding.
	// Essentially, keep extending the candidate path up to the next slash
	// until the decoded and normalized candidate path (with the path
	// parameters removed) is the same as the canonical path.
	String candidate;
	if (pos == -1) {
		candidate = uri;
	} else {
		candidate = uri.substring(0, pos);
	}
	candidate = removePathParameters(candidate);
	candidate = RequestUtil.URLDecode(candidate, connector.getURIEncoding());
	candidate = org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
	boolean match = canonicalContextPath.equals(candidate);
	while (!match && pos != -1) {
		pos = nextSlash(uriChars, pos + 1);
		if (pos == -1) {
			candidate = uri;
		} else {
			candidate = uri.substring(0, pos);
		}
		candidate = removePathParameters(candidate);
		candidate = RequestUtil.URLDecode(candidate, connector.getURIEncoding());
		candidate = org.apache.tomcat.util.http.RequestUtil.normalize(candidate);
		match = canonicalContextPath.equals(candidate);
	}
	if (match) {
		if (pos == -1) {
			return uri;
		} else {
			return uri.substring(0, pos);
		}
	} else {
		// Should never happen
		throw new IllegalStateException(
				sm.getString("coyoteRequest.getContextPath.ise", canonicalContextPath, uri));
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:63,代码来源:Request.java

示例14: getDecodedRequestURI

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
@Override
public String getDecodedRequestURI() {
	if (decodedRequestURI == null)
           decodedRequestURI = RequestUtil.URLDecode(getRequestURI());
       return decodedRequestURI;
}
 
开发者ID:Saisimon,项目名称:tip,代码行数:7,代码来源:HttpRequest.java

示例15: setURLPattern

import org.apache.catalina.util.RequestUtil; //导入方法依赖的package包/类
public void setURLPattern(String urlPattern) {
    this.urlPattern = RequestUtil.URLDecode(urlPattern);
}
 
开发者ID:eclipsky,项目名称:HowTomcatWorks,代码行数:4,代码来源:FilterMap.java


注:本文中的org.apache.catalina.util.RequestUtil.URLDecode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。