java filterconfig

阅读: 评论:0

java filterconfig

java filterconfig

本文整理匯總了Java中javax.InitParameter方法的典型用法代碼示例。如果您正苦於以下問題:InitParameter方法的具體用法?InitParameter怎麽用?InitParameter使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.servlet.FilterConfig的用法示例。

在下文中一共展示了InitParameter方法的18個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: getProxyuserConfiguration

​點讚 3

import javax.servlet.FilterConfig; //導入方法依賴的package包/類

/**

* Returns the proxyuser configuration. All returned properties must start

* with proxyuser.'

*

* Subclasses may override this method if the proxyuser configuration is

* read from other place than the filter init parameters.

*

* @param filterConfig filter configuration object

* @return the proxyuser configuration properties.

* @throws ServletException thrown if the configuration could not be created.

*/

protected Configuration getProxyuserConfiguration(FilterConfig filterConfig)

throws ServletException {

// this filter class gets the configuration from the filter configs, we are

// creating an empty configuration and injecting the proxyuser settings in

// it. In the initialization of the filter, the returned configuration is

// passed to the ProxyUsers which only looks for 'proxyusers.' properties.

Configuration conf = new Configuration(false);

Enumeration> names = InitParameterNames();

while (names.hasMoreElements()) {

String name = (String) Element();

if (name.startsWith(PROXYUSER_PREFIX + ".")) {

String value = InitParameter(name);

conf.set(name, value);

}

}

return conf;

}

開發者ID:nucypher,項目名稱:hadoop-oss,代碼行數:29,

示例2: init

​點讚 3

import javax.servlet.FilterConfig; //導入方法依賴的package包/類

/**

* Place this filter into service.

*

* @param filterConfig The filter configuration object

*/

public void init(FilterConfig filterConfig) throws ServletException {

this.filterConfig = filterConfig;

String value = InitParameter("ignore");

if (value == null)

this.ignore = true;

else if (value.equalsIgnoreCase("true"))

this.ignore = true;

else if (value.equalsIgnoreCase("yes"))

this.ignore = true;

else

this.ignore = false;

}

開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:21,

示例3: init

​點讚 3

import javax.servlet.FilterConfig; //導入方法依賴的package包/類

/**

* 方法名稱:初始化

* 概要說明:初始化過濾器

*

* @param fConfig 過濾器配置

* @throws ServletException Servlet異常

* @see Filter#init(FilterConfig)

*/

public void init(FilterConfig fConfig) throws ServletException {

String param = InitParameter(PARAM_KEY_HEADERS);

if (param == null || im().length() < 1) {

return;

}

this.headers = new HashMap();

String[] params = param.split(",");

String[] kvs = null;

for (int i = 0; i < params.length; i++) {

param = params[i];

if (param != null && im().length() > 0) {

kvs = param.split("=");

if (kvs != null && kv

本文发布于:2024-01-29 10:56:29,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170649699414790.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:普里姆算法
标签:java   filterconfig
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23