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

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

?? tilesview.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.servlet.view.tiles;

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

import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.ComponentDefinition;
import org.apache.struts.tiles.Controller;
import org.apache.struts.tiles.DefinitionsFactory;
import org.apache.struts.tiles.TilesUtilImpl;

import org.springframework.context.ApplicationContextException;
import org.springframework.web.servlet.view.InternalResourceView;

/**
 * View implementation that retrieves a Tiles definition.
 * The "url" property is interpreted as name of a Tiles definition.
 *
 * <p>{@link TilesJstlView} with JSTL support is a separate class,
 * mainly to avoid JSTL dependencies in this class.
 *
 * <p><b>NOTE:</b> This TilesView class supports Tiles 1.x,
 * a.k.a. "Struts Tiles", which comes as part of Struts 1.x.
 * For Tiles 2.x support, check out
 * {@link org.springframework.web.servlet.view.tiles2.TilesView}.
 *
 * <p>Depends on a Tiles DefinitionsFactory which must be available
 * in the ServletContext. This factory is typically set up via a
 * {@link TilesConfigurer} bean definition in the application context.
 *
 * <p>Check out {@link ComponentControllerSupport} which provides
 * a convenient base class for Spring-aware component controllers,
 * allowing convenient access to the Spring ApplicationContext.
 *
 * @author Alef Arendsen
 * @author Juergen Hoeller
 * @see #setUrl
 * @see TilesJstlView
 * @see TilesConfigurer
 * @see ComponentControllerSupport
 */
public class TilesView extends InternalResourceView {

	/**
	 * Name of the attribute that will override the path of the layout page
	 * to render. A Tiles component controller can set such an attribute
	 * to dynamically switch the look and feel of a Tiles page.
	 * @see #setPath
	 */
	public static final String PATH_ATTRIBUTE = TilesView.class.getName() + ".PATH";

	/**
	 * Set the path of the layout page to render.
	 * @param request current HTTP request
	 * @param path the path of the layout page
	 * @see #PATH_ATTRIBUTE
	 */
	public static void setPath(HttpServletRequest request, String path) {
		request.setAttribute(PATH_ATTRIBUTE, path);
	}


	private DefinitionsFactory definitionsFactory;


	protected void initApplicationContext() throws ApplicationContextException {
		super.initApplicationContext();

		// get definitions factory
		this.definitionsFactory =
				(DefinitionsFactory) getServletContext().getAttribute(TilesUtilImpl.DEFINITIONS_FACTORY);
		if (this.definitionsFactory == null) {
			throw new ApplicationContextException("Tiles definitions factory not found: TilesConfigurer not defined?");
		}
	}

	/**
	 * Prepare for rendering the Tiles definition: Execute the associated
	 * component controller if any, and determine the request dispatcher path.
	 */
	protected String prepareForRendering(HttpServletRequest request, HttpServletResponse response)
			throws Exception {

		// get component definition
		ComponentDefinition definition = getComponentDefinition(this.definitionsFactory, request);
		if (definition == null) {
			throw new ServletException("No Tiles definition found for name '" + getUrl() + "'");
		}

		// get current component context
		ComponentContext context = getComponentContext(definition, request);

		// execute component controller associated with definition, if any
		Controller controller = getController(definition, request);
		if (controller != null) {
			if (logger.isDebugEnabled()) {
				logger.debug("Executing Tiles controller [" + controller + "]");
			}
			executeController(controller, context, request, response);
		}

		// determine the path of the definition
		String path = getDispatcherPath(definition, request);
		if (path == null) {
			throw new ServletException(
					"Could not determine a path for Tiles definition '" + definition.getName() + "'");
		}

		return path;
	}

	/**
	 * Determine the Tiles component definition for the given Tiles
	 * definitions factory.
	 * @param factory the Tiles definitions factory
	 * @param request current HTTP request
	 * @return the component definition
	 */
	protected ComponentDefinition getComponentDefinition(DefinitionsFactory factory, HttpServletRequest request)
	    throws Exception {
		return factory.getDefinition(getUrl(), request, getServletContext());
	}

	/**
	 * Determine the Tiles component context for the given Tiles definition.
	 * @param definition the Tiles definition to render
	 * @param request current HTTP request
	 * @return the component context
	 * @throws Exception if preparations failed
	 */
	protected ComponentContext getComponentContext(ComponentDefinition definition, HttpServletRequest request)
	    throws Exception {
		ComponentContext context = ComponentContext.getContext(request);
		if (context == null) {
			context = new ComponentContext(definition.getAttributes());
			ComponentContext.setContext(context, request);
		}
		else {
			context.addMissing(definition.getAttributes());
		}
		return context;
	}

	/**
	 * Determine and initialize the Tiles component controller for the
	 * given Tiles definition, if any.
	 * @param definition the Tiles definition to render
	 * @param request current HTTP request
	 * @return the component controller to execute, or <code>null</code> if none
	 * @throws Exception if preparations failed
	 */
	protected Controller getController(ComponentDefinition definition, HttpServletRequest request)
			throws Exception {

		return definition.getOrCreateController();
	}

	/**
	 * Execute the given Tiles controller.
	 * @param controller the component controller to execute
	 * @param context the component context
	 * @param request current HTTP request
	 * @param response current HTTP response
	 * @throws Exception if controller execution failed
	 */
	protected void executeController(
			Controller controller, ComponentContext context, HttpServletRequest request, HttpServletResponse response)
	    throws Exception {

		controller.perform(context, request, response, getServletContext());
	}

	/**
	 * Determine the dispatcher path for the given Tiles definition,
	 * i.e. the request dispatcher path of the layout page.
	 * @param definition the Tiles definition to render
	 * @param request current HTTP request
	 * @return the path of the layout page to render
	 * @throws Exception if preparations failed
	 */
	protected String getDispatcherPath(ComponentDefinition definition, HttpServletRequest request)
	    throws Exception {

		Object pathAttr = request.getAttribute(PATH_ATTRIBUTE);
		return (pathAttr != null ? pathAttr.toString() : definition.getPath());
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久精品| 精品一区二区三区在线播放视频 | 欧美色成人综合| 夜夜嗨av一区二区三区中文字幕 | 国产三级精品三级在线专区| 丰满白嫩尤物一区二区| 中文一区一区三区高中清不卡| 一区二区三区免费| 欧美日本一道本在线视频| 国产91精品久久久久久久网曝门 | 99久久精品免费看国产| 日韩一区二区在线免费观看| 91麻豆精品国产综合久久久久久| 亚洲精品在线免费播放| 99精品久久免费看蜜臀剧情介绍| 91精品国产综合久久香蕉麻豆| 久久九九久久九九| 欧美老年两性高潮| 91色|porny| 国产精品福利影院| 欧美xxxxxxxxx| 日韩丝袜美女视频| 免费观看30秒视频久久| 亚洲制服丝袜av| 日韩精品中文字幕一区| 精品第一国产综合精品aⅴ| 在线播放欧美女士性生活| 亚洲成va人在线观看| 一区二区三区四区国产精品| 国产丝袜美腿一区二区三区| 欧美系列一区二区| 欧美亚洲动漫另类| 欧美性感一区二区三区| 欧美中文字幕一区二区三区亚洲| 日韩欧美国产综合一区| 色综合中文字幕国产 | 欧美国产精品中文字幕| 久久亚区不卡日本| 精品国产露脸精彩对白| 精品久久久三级丝袜| 欧美精品一区二区三区蜜桃 | 国产精品国模大尺度视频| 欧美电视剧免费全集观看| 5月丁香婷婷综合| 5月丁香婷婷综合| 精品国产一区a| 国产欧美日韩精品a在线观看| 精品国产凹凸成av人导航| 欧美性生活大片视频| 欧美日韩一级片网站| 欧美日本精品一区二区三区| 91免费观看在线| 91精品免费观看| 欧美成人一区二区三区片免费 | 欧美一级专区免费大片| 91女人视频在线观看| 91色.com| 欧美吞精做爰啪啪高潮| 日韩欧美一区在线观看| 欧美日韩一卡二卡| 久久久影视传媒| 国产精品第13页| 亚洲综合色网站| 日韩国产在线一| 激情综合色综合久久综合| 欧美日韩一区二区三区高清| 欧美日韩一级二级| 国产欧美一区二区精品婷婷| ㊣最新国产の精品bt伙计久久| 国产盗摄精品一区二区三区在线 | 久久久久久97三级| 国产精品福利在线播放| 国产精品久久久久7777按摩| 亚洲国产综合91精品麻豆| 日产欧产美韩系列久久99| 国产蜜臀av在线一区二区三区| 97精品超碰一区二区三区| 7777精品伊人久久久大香线蕉| 久久国产麻豆精品| 高清视频一区二区| 91 com成人网| 国产欧美日韩卡一| 日韩专区欧美专区| 91女厕偷拍女厕偷拍高清| 精品成人一区二区| 五月激情六月综合| 日本国产一区二区| 色视频欧美一区二区三区| 久久精品视频在线看| 日韩精品国产欧美| 91毛片在线观看| 香蕉加勒比综合久久| 欧美一级片在线观看| 精品一区二区在线免费观看| 精品国产凹凸成av人导航| 国产成都精品91一区二区三| 国产精品久久看| 欧美日韩一区二区在线观看视频| 成人综合在线观看| 日韩欧美国产一区二区三区 | 亚洲成人在线观看视频| 精一区二区三区| 日韩黄色小视频| 欧美主播一区二区三区美女| 亚洲女人小视频在线观看| 国产一区不卡视频| 7777精品伊人久久久大香线蕉经典版下载 | 欧美又粗又大又爽| 中文字幕亚洲精品在线观看| 丝袜a∨在线一区二区三区不卡| 依依成人精品视频| 香蕉影视欧美成人| 国产精品综合久久| 国产午夜三级一区二区三| 日本亚洲欧美天堂免费| 日韩一区二区三区在线观看| 一区二区三区高清在线| 国产一区二区美女| 91在线精品一区二区| 国产精品久久久久一区二区三区共| 欧美性受极品xxxx喷水| 亚洲精品国产精品乱码不99| 成人av网站在线观看免费| 国产精品国产三级国产aⅴ无密码| 91精品国产欧美一区二区18| 久久久亚洲国产美女国产盗摄| 欧美日韩亚洲综合在线 | 亚洲人成人一区二区在线观看| 亚洲三级在线播放| 亚洲精品久久7777| 欧美年轻男男videosbes| 黄色精品一二区| 国产精品久久久久久久久动漫| 精品国产一区二区三区av性色| 久草这里只有精品视频| 日韩精品一区二区三区视频播放 | 日本一道高清亚洲日美韩| 日韩三级电影网址| 国产综合色产在线精品| 日韩三级av在线播放| 国产suv一区二区三区88区| 久久老女人爱爱| 亚洲自拍偷拍综合| 欧美一级高清大全免费观看| 国产麻豆精品95视频| 亚洲视频狠狠干| 大美女一区二区三区| 91精品中文字幕一区二区三区| 7777精品伊人久久久大香线蕉完整版 | 亚洲人成人一区二区在线观看| 亚洲美女免费在线| 精品欧美一区二区在线观看| 久久国产人妖系列| 亚洲人成在线观看一区二区| 欧美极品美女视频| 亚洲一卡二卡三卡四卡| 97久久超碰精品国产| 国产精品国产自产拍高清av| 亚洲国产电影在线观看| 亚洲欧洲日本在线| 久久不见久久见免费视频7 | 91天堂素人约啪| 欧美人体做爰大胆视频| 亚洲精品一线二线三线无人区| 国产乱国产乱300精品| 91精品一区二区三区在线观看| 日本亚洲天堂网| 日韩欧美色综合网站| 美国毛片一区二区三区| 国产人成亚洲第一网站在线播放| 亚洲人成影院在线观看| 丰满白嫩尤物一区二区| 亚洲精品国产一区二区精华液 | 久久精品视频网| 成人免费av在线| 亚洲成人精品一区| 欧美精品在线观看播放| 国产风韵犹存在线视精品| 国产精品美女久久久久久2018 | 日韩三级精品电影久久久 | 国产精品久久久久影院| 一本一道久久a久久精品| 亚洲男女一区二区三区| 精品国产成人在线影院| aaa欧美色吧激情视频| 日韩中文字幕不卡| ...xxx性欧美| 日韩一区二区电影网| 在线亚洲精品福利网址导航| 久久99国产精品免费网站| 视频一区欧美精品| 日韩一区二区三区视频在线观看| 久久久综合视频| 91精品国产综合久久国产大片| 中文字幕在线观看一区| 国产三级欧美三级日产三级99| 国产成人在线看| 国产精品一区免费视频| 99re热这里只有精品免费视频| 亚洲成人精品一区|