亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? facescontextutils.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2006 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.web.jsf;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;

import org.springframework.util.Assert;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.util.WebUtils;

/**
 * Convenience methods to retrieve the root WebApplicationContext for a given
 * FacesContext. This is e.g. useful for accessing a Spring context from
 * custom JSF code.
 *
 * <p>Analogous to Spring's WebApplicationContextUtils for the ServletContext.
 *
 * @author Juergen Hoeller
 * @since 1.1
 * @see org.springframework.web.context.ContextLoader
 * @see org.springframework.web.context.support.WebApplicationContextUtils
 */
public abstract class FacesContextUtils {

	/**
	 * Find the root WebApplicationContext for this web app, which is
	 * typically loaded via ContextLoaderListener or ContextLoaderServlet.
	 * <p>Will rethrow an exception that happened on root context startup,
	 * to differentiate between a failed context startup and no context at all.
	 * @param fc the FacesContext to find the web application context for
	 * @return the root WebApplicationContext for this web app, or <code>null</code> if none
	 * @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
	 */
	public static WebApplicationContext getWebApplicationContext(FacesContext fc) {
		Assert.notNull(fc, "FacesContext must not be null");
		Object attr = fc.getExternalContext().getApplicationMap().get(
				WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
		if (attr == null) {
			return null;
		}
		if (attr instanceof RuntimeException) {
			throw (RuntimeException) attr;
		}
		if (attr instanceof Error) {
			throw (Error) attr;
		}
		if (!(attr instanceof WebApplicationContext)) {
			throw new IllegalStateException("Root context attribute is not of type WebApplicationContext: " + attr);
		}
		return (WebApplicationContext) attr;
	}

	/**
	 * Find the root WebApplicationContext for this web app, which is
	 * typically loaded via ContextLoaderListener or ContextLoaderServlet.
	 * <p>Will rethrow an exception that happened on root context startup,
	 * to differentiate between a failed context startup and no context at all.
	 * @param fc the FacesContext to find the web application context for
	 * @return the root WebApplicationContext for this web app
	 * @throws IllegalStateException if the root WebApplicationContext could not be found
	 * @see org.springframework.web.context.WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE
	 */
	public static WebApplicationContext getRequiredWebApplicationContext(FacesContext fc)
	    throws IllegalStateException {

		WebApplicationContext wac = getWebApplicationContext(fc);
		if (wac == null) {
			throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?");
		}
		return wac;
	}

	/**
	 * Return the best available mutex for the given session:
	 * that is, an object to synchronize on for the given session.
	 * <p>Returns the session mutex attribute if available; usually,
	 * this means that the HttpSessionMutexListener needs to be defined
	 * in <code>web.xml</code>. Falls back to the Session reference itself
	 * if no mutex attribute found.
	 * <p>The session mutex is guaranteed to be the same object during
	 * the entire lifetime of the session, available under the key defined
	 * by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
	 * safe reference to synchronize on for locking on the current session.
	 * <p>In many cases, the Session reference itself is a safe mutex
	 * as well, since it will always be the same object reference for the
	 * same active logical session. However, this is not guaranteed across
	 * different servlet containers; the only 100% safe way is a session mutex.
	 * @param fc the FacesContext to find the session mutex for
	 * @return the mutex object (never <code>null</code>)
	 * @see org.springframework.web.util.WebUtils#SESSION_MUTEX_ATTRIBUTE
	 * @see org.springframework.web.util.HttpSessionMutexListener
	 */
	public static Object getSessionMutex(FacesContext fc) {
		Assert.notNull(fc, "FacesContext must not be null");
		ExternalContext ec = fc.getExternalContext();
		Object mutex = ec.getSessionMap().get(WebUtils.SESSION_MUTEX_ATTRIBUTE);
		if (mutex == null) {
			mutex = ec.getSession(true);
		}
		return mutex;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲图片欧美综合| 久久久久久97三级| 亚洲制服丝袜在线| 欧美少妇一区二区| 日韩电影在线免费看| 91精品国产综合久久蜜臀| 男男视频亚洲欧美| 日韩欧美三级在线| 国产成人亚洲精品狼色在线| 国产精品欧美久久久久一区二区| 97精品电影院| 偷拍亚洲欧洲综合| 久久综合精品国产一区二区三区| 丁香五精品蜜臀久久久久99网站| 亚洲欧洲在线观看av| 欧美日韩一区二区在线观看| 六月丁香综合在线视频| 国产精品午夜电影| 欧美在线你懂得| 卡一卡二国产精品 | 午夜av一区二区| 日韩午夜电影av| 国产成人在线观看| 亚洲午夜羞羞片| 国产亚洲成aⅴ人片在线观看| 91一区一区三区| 日本成人在线不卡视频| 国产精品色噜噜| 91精品中文字幕一区二区三区| 成人久久视频在线观看| 午夜影院久久久| 综合色中文字幕| 欧美一区二区三区爱爱| www.欧美亚洲| 美女一区二区久久| 亚洲丝袜制服诱惑| 26uuu亚洲婷婷狠狠天堂| 色综合激情五月| 久久精品国产一区二区| 一区二区三区四区在线播放| 欧美精品一区二区久久婷婷| 91成人看片片| 成人免费视频app| 蜜桃视频免费观看一区| 亚洲制服丝袜av| 国产精品久久久久久福利一牛影视 | 欧美日韩国产成人在线免费| 国产精品资源在线| 日本免费在线视频不卡一不卡二| 亚洲色图欧洲色图| 国产欧美日韩中文久久| 日韩一区二区三区三四区视频在线观看| 成人高清视频在线观看| 国产一区福利在线| 日韩黄色一级片| 亚洲网友自拍偷拍| 亚洲精品免费播放| 亚洲欧洲在线观看av| 国产女主播视频一区二区| 日韩欧美一级二级三级| 在线不卡a资源高清| 欧美日韩在线电影| 欧美亚洲国产一区二区三区| 99国产精品久| 成人在线综合网| 国产成人aaa| 国产不卡在线播放| 国产99久久久国产精品免费看| 激情小说欧美图片| 激情综合网激情| 国内精品国产成人国产三级粉色| 另类综合日韩欧美亚洲| 蜜桃传媒麻豆第一区在线观看| 日韩在线一二三区| 日韩精品一区第一页| 日本一不卡视频| 麻豆免费精品视频| 韩国av一区二区| 国产精品69久久久久水密桃| 国产精品综合一区二区三区| 国产中文字幕精品| 国产成人av电影在线播放| 成人国产一区二区三区精品| 国产+成+人+亚洲欧洲自线| 成人黄色777网| 一本色道久久综合亚洲91| 欧美在线免费播放| 欧美日本一区二区| 欧美成人猛片aaaaaaa| 欧美不卡在线视频| 久久精品亚洲国产奇米99| 欧美国产激情二区三区| 国产精品国产a| 亚洲午夜免费福利视频| 欧美aaaaa成人免费观看视频| 精品在线一区二区三区| 国产乱色国产精品免费视频| 成人一二三区视频| 97超碰欧美中文字幕| 777久久久精品| 国产欧美日韩久久| 一区二区在线观看免费视频播放| 天天做天天摸天天爽国产一区 | 日韩伦理av电影| 亚洲sss视频在线视频| 久久激情综合网| av在线播放一区二区三区| 91黄色小视频| 精品国产3级a| 亚洲欧美激情小说另类| 日韩成人av影视| av成人动漫在线观看| 91麻豆精品国产自产在线观看一区 | 性久久久久久久| 国产精品资源在线看| 欧美在线免费播放| 国产网站一区二区三区| 亚洲午夜精品久久久久久久久| 久久成人免费网| 在线免费一区三区| 国产亚洲婷婷免费| 亚洲国产成人高清精品| 国产福利精品导航| 欧美日韩一区二区不卡| 国产欧美日韩视频在线观看| 亚洲一二三专区| 国产1区2区3区精品美女| 欧美精品日日鲁夜夜添| 亚洲欧美综合网| 激情国产一区二区| 欧美三级三级三级| 中文字幕制服丝袜成人av| 奇米影视7777精品一区二区| 91视频免费观看| 国产日韩在线不卡| 日韩影院免费视频| 在线视频一区二区三| 国产精品久久久久9999吃药| 久久99久国产精品黄毛片色诱| 欧美天堂一区二区三区| 国产精品成人午夜| 精品一二三四区| 欧美一级欧美三级| 亚洲国产精品久久不卡毛片 | 欧美午夜不卡视频| 国产欧美综合在线观看第十页 | 国产一区在线观看麻豆| 欧美日本国产视频| 一区二区三区精密机械公司| 国产69精品久久久久777| 欧美精品一区二区三区视频 | 国产精品羞羞答答xxdd| 日韩午夜中文字幕| 天天操天天综合网| 欧美日韩欧美一区二区| 日韩美女啊v在线免费观看| 国产成人精品亚洲777人妖| 亚洲精品在线免费观看视频| 免费成人av资源网| 欧美一区二区三区爱爱| 日韩在线播放一区二区| 9191久久久久久久久久久| 一区二区三区日韩欧美精品| 91在线无精精品入口| 中文字幕在线不卡一区| 成人福利视频在线看| 国产日韩欧美不卡在线| 国产一区二区三区黄视频| 欧美精品一区二区高清在线观看| 久久av资源网| 亚洲精品在线一区二区| 国产老女人精品毛片久久| 久久青草国产手机看片福利盒子| 国产乱码精品一区二区三区忘忧草| 精品粉嫩超白一线天av| 国产高清视频一区| 国产精品久久三区| 色哟哟欧美精品| 五月天丁香久久| 欧美成人午夜电影| 极品美女销魂一区二区三区免费| 久久综合狠狠综合久久激情| 国产成人午夜精品影院观看视频| 国产精品理伦片| 欧美日韩综合不卡| 日韩av成人高清| xvideos.蜜桃一区二区| 成人av手机在线观看| 亚洲夂夂婷婷色拍ww47| 91精品国产麻豆| 国产精品系列在线播放| 亚洲日本va午夜在线影院| 欧美日韩国产三级| 韩国三级电影一区二区| ...av二区三区久久精品| 欧美精品乱码久久久久久| 精品一区二区免费| 国产精品福利一区| 欧美日韩高清一区| 国产制服丝袜一区|