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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? delegatingrequestprocessor.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2007 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.struts;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.RequestProcessor;
import org.apache.struts.config.ModuleConfig;

import org.springframework.beans.BeansException;
import org.springframework.web.context.WebApplicationContext;

/**
 * Subclass of Struts's default {@link RequestProcessor} that looks up
 * Spring-managed Struts {@link Action Actions} defined in
 * {@link ContextLoaderPlugIn ContextLoaderPlugIn's} {@link WebApplicationContext}
 * (or, as a fallback, in the root <code>WebApplicationContext</code>).
 *
 * <p>In the Struts config file, you can either specify the original
 * <code>Action</code> class (as when generated by XDoclet), or no
 * <code>Action</code> class at all. In any case, Struts will delegate to an
 * <code>Action</code> bean in the <code>ContextLoaderPlugIn</code> context.
 *
 * <pre class="code">&lt;action path="/login" type="myapp.MyAction"/&gt;</pre>
 *
 * or
 *
 * <pre class="code">&lt;action path="/login"/&gt;</pre>
 *
 * The name of the <code>Action</code> bean in the
 * <code>WebApplicationContext</code> will be determined from the mapping path
 * and module prefix. This can be customized by overriding the
 * {@link #determineActionBeanName} method.
 *
 * <p>Example:
 * <ul>
 * <li>mapping path "/login" -> bean name "/login"<br>
 * <li>mapping path "/login", module prefix "/mymodule" ->
 * bean name "/mymodule/login"
 * </ul>
 *
 * <p>A corresponding bean definition in the <code>ContextLoaderPlugin</code>
 * context would look as follows; notice that the <code>Action</code> is now
 * able to leverage fully Spring's configuration facilities:
 *
 * <pre class="code">
 * &lt;bean name="/login" class="myapp.MyAction"&gt;
 *   &lt;property name="..."&gt;...&lt;/property&gt;
 * &lt;/bean&gt;</pre>
 *
 * Note that you can use a single <code>ContextLoaderPlugIn</code> for all
 * Struts modules. That context can in turn be loaded from multiple XML files,
 * for example split according to Struts modules. Alternatively, define one
 * <code>ContextLoaderPlugIn</code> per Struts module, specifying appropriate
 * "contextConfigLocation" parameters. In both cases, the Spring bean name has
 * to include the module prefix.
 *
 * <p>If you also need the Tiles setup functionality of the original
 * <code>TilesRequestProcessor</code>, use
 * <code>DelegatingTilesRequestProcessor</code>. As there is just a
 * single central class to customize in Struts, we have to provide another
 * subclass here, covering both the Tiles and the Spring delegation aspect.
 *
 * <p>If this <code>RequestProcessor</code> conflicts with the need for a
 * different <code>RequestProcessor</code> subclass (other than
 * <code>TilesRequestProcessor</code>), consider using
 * {@link DelegatingActionProxy} as the Struts <code>Action</code> type in
 * your struts-config file.
 *
 * <p>The default implementation delegates to the
 * <code>DelegatingActionUtils</code> class as much as possible, to reuse as
 * much code as possible despite the need to provide two
 * <code>RequestProcessor</code> subclasses. If you need to subclass yet
 * another <code>RequestProcessor</code>, take this class as a template,
 * delegating to <code>DelegatingActionUtils</code> just like it.
 *
 * @author Juergen Hoeller
 * @since 1.0.2
 * @see #determineActionBeanName
 * @see DelegatingTilesRequestProcessor
 * @see DelegatingActionProxy
 * @see DelegatingActionUtils
 * @see ContextLoaderPlugIn
 */
public class DelegatingRequestProcessor extends RequestProcessor {

	private WebApplicationContext webApplicationContext;
	

	public void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException {
		super.init(actionServlet, moduleConfig);
		if (actionServlet != null) {
			this.webApplicationContext = initWebApplicationContext(actionServlet, moduleConfig);
		}
	}

	/**
	 * Fetch ContextLoaderPlugIn's {@link WebApplicationContext} from the
	 * <code>ServletContext</code>, falling back to the root
	 * <code>WebApplicationContext</code>.
	 * <p>This context is supposed to contain the Struts <code>Action</code>
	 * beans to delegate to.
	 * @param actionServlet the associated <code>ActionServlet</code>
	 * @param moduleConfig the associated <code>ModuleConfig</code>
	 * @return the <code>WebApplicationContext</code>
	 * @throws IllegalStateException if no <code>WebApplicationContext</code> could be found
	 * @see DelegatingActionUtils#findRequiredWebApplicationContext
	 * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX
	 */
	protected WebApplicationContext initWebApplicationContext(
			ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException {

		return DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig);
	}

	/**
	 * Return the <code>WebApplicationContext</code> that this processor
	 * delegates to.
	 */
	protected final WebApplicationContext getWebApplicationContext() {
		return this.webApplicationContext;
	}


	/**
	 * Override the base class method to return the delegate action.
	 * @see #getDelegateAction
	 */
	protected Action processActionCreate(
			HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)
			throws IOException {

		Action action = getDelegateAction(mapping);
		if (action != null) {
			return action;
		}
		return super.processActionCreate(request, response, mapping);
	}

	/**
	 * Return the delegate <code>Action</code> for the given mapping.
	 * <p>The default implementation determines a bean name from the
	 * given <code>ActionMapping</code> and looks up the corresponding
	 * bean in the <code>WebApplicationContext</code>.
	 * @param mapping the Struts <code>ActionMapping</code>
	 * @return the delegate <code>Action</code>, or <code>null</code> if none found
	 * @throws BeansException if thrown by <code>WebApplicationContext</code> methods
	 * @see #determineActionBeanName
	 */
	protected Action getDelegateAction(ActionMapping mapping) throws BeansException {
		String beanName = determineActionBeanName(mapping);
		if (!getWebApplicationContext().containsBean(beanName)) {
			return null;
		}
		return (Action) getWebApplicationContext().getBean(beanName, Action.class);
	}

	/**
	 * Determine the name of the <code>Action</code> bean, to be looked up in
	 * the <code>WebApplicationContext</code>.
	 * <p>The default implementation takes the
	 * {@link org.apache.struts.action.ActionMapping#getPath mapping path} and
	 * prepends the
	 * {@link org.apache.struts.config.ModuleConfig#getPrefix module prefix},
	 * if any.
	 * @param mapping the Struts <code>ActionMapping</code>
	 * @return the name of the Action bean
	 * @see DelegatingActionUtils#determineActionBeanName
	 * @see org.apache.struts.action.ActionMapping#getPath
	 * @see org.apache.struts.config.ModuleConfig#getPrefix
	 */
	protected String determineActionBeanName(ActionMapping mapping) {
		return DelegatingActionUtils.determineActionBeanName(mapping);
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本久久一区二区三区| 国产精品久久精品日日| 国产美女主播视频一区| 日韩高清一区二区| 亚洲在线成人精品| 首页国产欧美日韩丝袜| 久久奇米777| 国产精品人成在线观看免费| 精品久久久久av影院| 国产婷婷色一区二区三区四区| www亚洲一区| 亚洲青青青在线视频| 午夜视频一区二区| 国产原创一区二区| 色悠悠亚洲一区二区| 色综合天天综合狠狠| 欧美日韩aaa| 精品一区二区三区蜜桃| 蜜桃av一区二区三区| 国产福利精品导航| 欧美日韩免费高清一区色橹橹| 欧美一区二区网站| 中文字幕日本不卡| 久久精品国内一区二区三区| 99久久伊人精品| 久久99这里只有精品| 欧洲亚洲国产日韩| 91精品免费在线| 亚洲激情第一区| 成人黄色在线视频| 久久免费视频色| 麻豆精品国产91久久久久久| 一本一道波多野结衣一区二区| 国产婷婷一区二区| 久久超级碰视频| 日韩免费高清电影| 免费成人在线观看| 日韩美女天天操| 亚洲成人av资源| 欧洲av一区二区嗯嗯嗯啊| 国产精品另类一区| voyeur盗摄精品| 成人福利在线看| 亚洲男帅同性gay1069| 欧美在线免费播放| 国产激情91久久精品导航| 国产一区二区三区免费看| 日韩午夜av电影| 国产精品影视在线观看| 337p日本欧洲亚洲大胆色噜噜| 日韩和欧美一区二区三区| 91国偷自产一区二区三区观看| 夜夜精品视频一区二区 | 亚洲欧洲日产国码二区| 色综合天天综合网国产成人综合天| 中文字幕精品一区二区三区精品| 成人小视频在线观看| 国产精品传媒在线| 欧美一区二区在线免费观看| 成人夜色视频网站在线观看| 亚洲线精品一区二区三区| 欧美不卡激情三级在线观看| av成人老司机| 精品制服美女久久| 亚洲最新视频在线观看| 久久久久88色偷偷免费| 欧美色爱综合网| 色综合久久综合中文综合网| 久久精品二区亚洲w码| 亚洲第一av色| 亚洲另类春色国产| 日韩毛片高清在线播放| 久久久国产精品午夜一区ai换脸| 欧美午夜精品一区二区三区 | 高清在线观看日韩| 久久97超碰国产精品超碰| 亚洲一区二区偷拍精品| 中文字幕日本不卡| 亚洲品质自拍视频| 亚洲欧美日韩综合aⅴ视频| 亚洲精品视频观看| 国产精品乱码人人做人人爱 | 777欧美精品| 中文字幕av在线一区二区三区| 亚洲一区免费视频| 久久久久久久久久久电影| 精品第一国产综合精品aⅴ| 久久亚洲欧美国产精品乐播| 国产精品久久看| 午夜精品久久久久久久久| 国内精品国产成人| 成人sese在线| 欧美美女一区二区| 久久精品夜色噜噜亚洲aⅴ| 亚洲精品视频在线观看免费| 日本成人在线不卡视频| 国产a视频精品免费观看| 欧美性生活久久| 国产日韩欧美激情| 日韩二区在线观看| 99国内精品久久| 欧美成人video| 亚洲国产日韩a在线播放| 国产成人一级电影| 精品少妇一区二区| 国产精品久久久久久久久免费桃花| 国产精品久久二区二区| 亚洲福利电影网| 成人av片在线观看| 26uuu精品一区二区三区四区在线| 国产亚洲精品福利| 六月丁香婷婷久久| 欧美一激情一区二区三区| 中文字幕视频一区| 福利一区福利二区| 欧美成人女星排行榜| 男人的天堂久久精品| 在线观看欧美精品| 国产精品第五页| 欧美无砖砖区免费| 免费看欧美美女黄的网站| 国产原创一区二区三区| 欧美日韩亚洲综合在线| 日韩欧美一区电影| 日韩久久久久久| 久久99精品国产麻豆婷婷洗澡| 成人精品国产福利| 午夜欧美视频在线观看| 欧美精品777| 午夜影院在线观看欧美| 精品不卡在线视频| 99久久er热在这里只有精品15| 亚洲一区二区成人在线观看| 4438x亚洲最大成人网| 精油按摩中文字幕久久| 午夜久久福利影院| 欧美日韩国产美| 国产一区久久久| 亚洲色图视频网站| 精品国产电影一区二区| 日韩精品一级二级| 国产精品另类一区| 欧美一区二区三区人| 欧美亚洲一区二区三区四区| 美女视频免费一区| 一区在线中文字幕| 久久久九九九九| 日韩欧美一区二区免费| 欧美日韩国产综合一区二区| 高清在线成人网| 成人h动漫精品| 成人国产在线观看| 国产福利精品一区| 男人的天堂亚洲一区| 午夜精品爽啪视频| 亚洲18色成人| 午夜精品一区在线观看| 五月婷婷综合激情| 毛片基地黄久久久久久天堂| 国产亚洲视频系列| 风间由美一区二区三区在线观看| 中文一区在线播放| 综合欧美一区二区三区| 成人欧美一区二区三区| 亚洲一级电影视频| 精东粉嫩av免费一区二区三区| 亚洲午夜国产一区99re久久| 日韩av电影免费观看高清完整版| 日韩精品欧美精品| 成人精品国产一区二区4080| 欧美午夜寂寞影院| 国产日韩精品久久久| 亚洲成a人v欧美综合天堂下载| 国产精品一区二区在线看| 色哟哟国产精品| 日本一区二区视频在线| 亚洲你懂的在线视频| 日本成人在线一区| 99久久久久久| 久久一二三国产| 麻豆免费精品视频| 欧美日韩一区二区三区免费看 | 美女国产一区二区三区| 色吊一区二区三区| 中文字幕亚洲欧美在线不卡| 国产一区视频导航| 久久中文字幕电影| 九九**精品视频免费播放| 欧美一区二区网站| 精品一区二区国语对白| 在线视频欧美精品| 亚洲电影一级片| 欧美一区二区三区四区视频| 亚洲成av人片在线观看| 色诱亚洲精品久久久久久| 一区二区国产盗摄色噜噜| 欧美三级一区二区| 日本不卡一二三区黄网| 精品国产一区a| 不卡av在线免费观看|