- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.sun.faces.config.WebConfiguration
类的一些代码示例,展示了WebConfiguration
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebConfiguration
类的具体详情如下:
包路径:com.sun.faces.config.WebConfiguration
类名称:WebConfiguration
[英]Class Documentation
[中]类文档
代码示例来源:origin: org.glassfish/javax.faces
private String fetchProjectStageFromConfig() {
WebConfiguration webConfig = WebConfiguration.getInstance(FacesContext.getCurrentInstance().getExternalContext());
String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage);
if (value != null) {
if (LOGGER.isLoggable(FINE)) {
LOGGER.log(FINE, "ProjectStage configured via JNDI: {0}", value);
}
} else {
value = webConfig.getOptionValue(JavaxFacesProjectStage);
if (value != null && LOGGER.isLoggable(FINE)) {
LOGGER.log(FINE, "ProjectStage configured via servlet context init parameter: {0}", value);
}
}
return value;
}
代码示例来源:origin: org.glassfish/jakarta.faces
private void processViewHandlers(ServletContext servletContext, FacesContext facesContext, Application application, LinkedHashMap<String, Node> viewHandlers) {
// Take special action on the ViewHandlers that have been configured for the application.
// If any of the ViewHandlers is the FaceletViewHandler, don't install the 2.0 FaceletViewHandler.
// Make the application behave as 1.2 unless they use our ViewHandler
WebConfiguration webConfig = WebConfiguration.getInstance();
if (!webConfig.isOptionEnabled(DisableFaceletJSFViewHandler) && !webConfig.isOptionEnabled(DisableFaceletJSFViewHandlerDeprecated)) {
if (viewHandlers.containsKey("com.sun.facelets.FaceletViewHandler")) {
LOGGER.log(WARNING, "jsf.application.legacy_facelet_viewhandler_detected", "com.sun.facelets.FaceletViewHandler");
webConfig.overrideContextInitParameter(DisableFaceletJSFViewHandler, true);
}
}
for (Node viewHandlerNode : viewHandlers.values()) {
setViewHandler(servletContext, facesContext, application, viewHandlerNode);
}
}
代码示例来源:origin: org.glassfish/javax.faces
public MultiViewHandler() {
WebConfiguration config = WebConfiguration.getInstance();
configuredExtensions = config.getConfiguredExtensions();
extensionsSet = config.isSet(WebConfiguration.WebContextInitParameter.DefaultSuffix);
vdlFactory = (ViewDeclarationLanguageFactory) FactoryFinder.getFactory(VIEW_DECLARATION_LANGUAGE_FACTORY);
protectedViews = new CopyOnWriteArraySet<>();
}
代码示例来源:origin: com.sun.faces/jsf-impl
private void init() {
WebConfiguration webconfig = WebConfiguration.getInstance();
enableMissingResourceLibraryDetection =
webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
}
代码示例来源:origin: org.glassfish/javax.faces
public WebappResourceHelper() {
WebConfiguration webconfig = WebConfiguration.getInstance();
cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp);
BASE_RESOURCE_PATH = webconfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppResourcesDirectory);
BASE_CONTRACTS_PATH = webconfig.getOptionValue(WebConfiguration.WebContextInitParameter.WebAppContractsDirectory);
}
代码示例来源:origin: org.glassfish/javax.faces
public FaceletWebappResourceHelper() {
WebConfiguration webConfig = WebConfiguration.getInstance();
webAppContractsDirectory = webConfig.getOptionValue(WebAppContractsDirectory);
configuredExtensions = webConfig.getOptionValue(FaceletsSuffix, " ");
}
代码示例来源:origin: javax.faces/jsf-impl
private WebConfiguration(ServletContext servletContext) {
this.servletContext = servletContext;
String contextName = getServletContextName();
initSetList(servletContext);
processBooleanParameters(servletContext, contextName);
processInitParameters(servletContext, contextName);
if (canProcessJndiEntries()) {
processJndiEntries(contextName);
}
}
代码示例来源:origin: eclipse-ee4j/mojarra
webConfig = WebConfiguration.getInstance(context);
if (mappingsAdded == null) {
if (!webXmlProcessor.isFacesServletPresent()) {
if (!webConfig.isOptionEnabled(ForceLoadFacesConfigFiles)) {
LOGGER.log(FINE, "No FacesServlet found in deployment descriptor - bypassing configuration");
WebConfiguration.clear(context);
configManager.destroy(context, initContext);
ConfigManager.removeInstance(context);
webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true);
context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE);
if (webConfig.isOptionEnabled(VerifyFacesConfigObjects)) {
LOGGER.warning("jsf.config.verifyobjects.development_only");
webConfig.overrideContextInitParameter(EnableLazyBeanValidation, false);
Verifier.setCurrentInstance(new Verifier());
if (webConfig.isOptionEnabled(EnableWebsocketEndpoint)) {
ServerContainer serverContainer = (ServerContainer) context.getAttribute(ServerContainer.class.getName());
webConfig.doPostBringupActions();
configManager.publishPostConfigEvent();
代码示例来源:origin: org.glassfish/jakarta.faces
if (webConfig.canProcessJndiEntries() &&
!webConfig.isSet(BooleanWebContextInitParameter.DisableClientStateEncryption)) {
guard = new ByteArrayGuard();
} else {
stateTimeoutEnabled = webConfig.isSet(ClientStateTimeout);
if (stateTimeoutEnabled) {
String timeout = webConfig.getOptionValue(ClientStateTimeout);
try {
stateTimeout = Long.parseLong(timeout);
String size = webConfig.getOptionValue(
ClientStateWriteBufferSize);
String defaultSize =
debugSerializedState = webConfig.isOptionEnabled(BooleanWebContextInitParameter.EnableClientStateDebugging);
代码示例来源:origin: asual/summer
public FacesRenderKitImpl() {
webConfig = WebConfiguration.getInstance();
String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage);
if (value == null) {
value = webConfig.getOptionValue(WebContextInitParameter.JavaxFacesProjectStage);
}
try {
if (value != null) {
if (ProjectStage.valueOf(value).equals(ProjectStage.Development)) {
webConfig.overrideContextInitParameter(WebContextInitParameter.FaceletsDefaultRefreshPeriod,
WebContextInitParameter.FaceletsDefaultRefreshPeriod.getDefaultValue());
}
}
} catch (IllegalArgumentException e) {
}
}
代码示例来源:origin: javax.faces/jsf-impl
webConfig = WebConfiguration.getInstance(context);
ConfigManager configManager = ConfigManager.getInstance();
if (!webConfig.isOptionEnabled(BooleanWebContextInitParameter.ForceLoadFacesConfigFiles)) {
WebXmlProcessor processor = new WebXmlProcessor(context);
if (!processor.isFacesServletPresent()) {
"No FacesServlet found in deployment descriptor - bypassing configuration");
WebConfiguration.clear(context);
return;
} else {
webConfig.isOptionEnabled(BooleanWebContextInitParameter.EnableHtmlTagLibraryValidator));
if (webConfig.isOptionEnabled(BooleanWebContextInitParameter.VerifyFacesConfigObjects)) {
if (LOGGER.isLoggable(Level.WARNING)) {
LOGGER.warning("jsf.config.verifyobjects.development_only");
webConfig.overrideContextInitParameter(BooleanWebContextInitParameter.EnableLazyBeanValidation, false);
Verifier.setCurrentInstance(new Verifier());
if (webConfig.isOptionEnabled(EnableThreading)) {
initScripting();
代码示例来源:origin: org.glassfish.main.web/jsf-connector
WebConfiguration config = WebConfiguration.getInstance(ctx);
if (!config.isSet(WebConfiguration.BooleanWebContextInitParameter.EnableAgressiveSessionDirtying)) {
Object isDistributableObj = ctx.getAttribute(Constants.IS_DISTRIBUTABLE_ATTRIBUTE);
Object enableHAObj = ctx.getAttribute(Constants.ENABLE_HA_ATTRIBUTE);
LOGGER.fine("setting the EnableAgressiveSessionDirtying to true");
config.overrideContextInitParameter(WebConfiguration.BooleanWebContextInitParameter.EnableAgressiveSessionDirtying,
Boolean.TRUE);
代码示例来源:origin: com.sun.faces/jsf-impl
public static FaceletsConfiguration getInstance(FacesContext context) {
FaceletsConfiguration result = null;
Map<Object, Object> attrs = context.getAttributes();
result = (FaceletsConfiguration) attrs.get(FaceletsConfiguration.FACELETS_CONFIGURATION_ATTRIBUTE_NAME);
if (null == result) {
WebConfiguration config = WebConfiguration.getInstance(context.getExternalContext());
result = config.getFaceletsConfiguration();
attrs.put(FaceletsConfiguration.FACELETS_CONFIGURATION_ATTRIBUTE_NAME, result);
}
return result;
}
代码示例来源:origin: org.glassfish/jakarta.faces
webconfig.isOptionEnabled(DisableFaceletJSFViewHandler) ||
webconfig.isOptionEnabled(DisableFaceletJSFViewHandlerDeprecated);
webconfig.overrideContextInitParameter(DisableFaceletJSFViewHandler, isFaceletsDisabled);
代码示例来源:origin: org.glassfish/jakarta.faces
private boolean shouldInitConfigMonitoring() {
boolean development = isDevModeEnabled();
boolean threadingOptionSpecified = webConfig.isSet(EnableThreading);
if (development && !threadingOptionSpecified) {
return true;
}
return development && threadingOptionSpecified && webConfig.isOptionEnabled(EnableThreading);
}
代码示例来源:origin: org.glassfish/jakarta.faces
/**
* @param param the init parameter of interest
* @return <code>true</code> if the parameter was explicitly set,
* otherwise, <code>false</code>
*/
public boolean isSet(WebContextInitParameter param) {
return isSet(param.getQualifiedName());
}
代码示例来源:origin: com.sun.faces/jsf-impl
/**
* Constructs a new ResourceCache.
*/
public ResourceCache() {
this(WebConfiguration.getInstance());
}
代码示例来源:origin: org.glassfish/jakarta.faces
if (configManager == null && WebConfiguration.getInstanceWithoutCreating(context) != null) {
if (LOGGER.isLoggable(SEVERE)) {
LOGGER.log(SEVERE, "Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.");
FactoryFinder.releaseFactories();
ReflectionUtils.clearCache(Thread.currentThread().getContextClassLoader());
WebConfiguration.clear(context);
InitFacesContext.cleanupInitMaps(context);
代码示例来源:origin: org.glassfish/javax.faces
private boolean isMatchedWithFaceletsSuffix(String viewId) {
String[] defaultsuffixes = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsSuffix, " ");
for (String suffix : defaultsuffixes) {
if (viewId.endsWith(suffix)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.glassfish/jakarta.faces
@Override
public void comment(char[] ch, int start, int length)
throws SAXException {
if (this.inDocument) {
if (!unit.getWebConfiguration().getFaceletsConfiguration().isConsumeComments(alias)) {
this.unit.writeComment(new String(ch, start, length));
}
}
}
大家好,我正在使用 OpenCV(Python)开发人脸识别程序。我有两个文件,一个可以捕捉新用户的脸并按用户提供的名称存储它。第二个文件识别使用网络摄像头的用户。现在,我担心的是用户被正确识别,但名
一般来说,我的字体工作正常,但我偶尔会看到一些奇怪的情况,例如从另一个应用程序切换回浏览器,有时当从另一个选项卡切换回时,我的字体似乎已经卸载并正在使用后备字体。 我正在努力始终如一地复制它,当我看到
我经常在我开发的网站中嵌入 webfont (@font-face),直到今天我才遇到过重大问题。 其实我觉得line-height有很大的问题,我英文不是特别好所以我尽量用图来说明。我已经联系了 f
屏幕截图很棒,但没有呈现自定义 @font-face 字体。是否有可能纠正这一点? 最佳答案 在做了一些研究之后,我发现了这个 http://code.google.com/p/phantomjs/i
所以我有一个字体,我最近在几个网站上使用了它,叫做 Kondolar。这是一种可爱的字体,我实际上使用了 4 种字体粗细,所以在我的样式表中实际上有 4 个 @font-face 定义,每个定义都有自
非常感谢:)请找到完整的代码 导入boto3 s3_client = boto3.client('s3', aws_access_key_id='xxxxxxxxxxxxxxx', aws_secre
这不是以下的骗局:Can we test Face ID in simulator? 我想知道如何测试用户何时接受下面的 Face ID 警告,上面写着“你想允许“应用程序”使用 Face ID”,然
我需要检测 iPhone 朝向哪个方向,以便在掉落时从无障碍摄像头(正面或背面)进行录制。 这将在紧急情况下使用,手机掉落或放置在事件摄像头没有记录任何有值(value)内容的情况下。 我可以使用什么
我有一个需要 Trade Gothic 的网站。我想知道将 @font-face 或 cufon 与看起来类似于 Trade Gothic 的字体一起使用还是只是使用图像路线是更好的做法。显然,使用图
我在使用 Microsoft Face API 时遇到问题。以下是我的示例请求: curl -v -X POST "https://westus.api.cognitive.microsoft.com
我有一个在图像上运行并识别人脸并返回如下列表的脚本: [('Mike', (142, 464, 365, 241)),('Garry', (42, 364, 65, 141)),('unknown',
我有一个网络服务,可以重写 css 文件中的 url,以便可以通过 CDN 提供它们。 css 文件可以包含图像或字体的 url。 我目前有以下正则表达式来匹配 css 文件中的所有 url: (ur
我在乱用 @font-face 并且得到了一些奇怪的结果。我下载并安装了字体,它像它应该的那样安装在/Users/myuser/Library/Fonts 中(我想!?)。奇怪的是,无论我在 CSS
JSF 2 的 Mojarra 实现具有以下上下文参数: com.sun.faces.numberOfViewsInSession(默认为 15) com.sun.faces.numberOfLogi
jsf-api.jar 包含各种本地化的 Messages.properties 文件,这些文件一方面包含 javax.faces.component.UIInput.CONVERSION 键,另一方
谁能介绍一下 Liferay Faces 和 JSF 连接。就像我无法理解 Liferay 人脸在以下场景中的作用。 JSF ----> Model View Controller Spr
我正在尝试使用我的字体的“较轻”版本,但在 firefox 和 chrome 中它仍然显示为“正常”粗细。 这是我的 font.css: @font-face { font-family: Aveni
尝试访问应用程序时出现以下JavaScript错误。 Uncaught SyntaxError: Unexpected token 和的正常运行是必需的)。 您可能已经知道HTML文档通常通常以<和J
在我的应用程序中,我想对 UIImage 使用人脸检测,所以我使用库中的 CoreImage 构建(我知道 Vision Library 也是最新的人脸检测库。但它仅支持 ios 11.0 及以上)。
我需要从 Stylus 获得以下 CSS 输出(这是一种落后的方式,但 Stylus 将使该元素的许多其他部分变得更容易)。我已经尝试了很多东西,但无法编译,当它说它已经编译时,这部分输出没有任何显示
我是一名优秀的程序员,十分优秀!