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

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

?? defaultrequesttoviewnametranslator.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;

import javax.servlet.http.HttpServletRequest;

import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.RequestToViewNameTranslator;
import org.springframework.web.util.UrlPathHelper;

/**
 * {@link org.springframework.web.servlet.RequestToViewNameTranslator}
 * that simply transforms the URI of the incoming request into a view name.
 *
 * <p>Can be explicitly defined as the "viewNameTranslator" bean in a
 * {@link org.springframework.web.servlet.DispatcherServlet} context.
 * Otherwise, a plain default instance will be used.
 *
 * <p>The default transformation simply strips the leading slash and file
 * extension of the URI and returns the result as the view name with the
 * configured {@link #setPrefix(String) "prefix"} and a
 * {@link #setSuffix(String) "suffix"} added as appropriate.
 *
 * <p>The stripping of the leading slash and file extension can be disabled
 * using the {@link #setStripLeadingSlash "stripLeadingSlash"} and
 * {@link #setStripExtension "stripExtension"} properties, respectively.
 *
 * <p>Find below some examples of request to view name translation.
 *
 * <pre class="code">http://localhost:8080/gamecast/display.html -> display
 * http://localhost:8080/gamecast/displayShoppingCart.html -> displayShoppingCart
 * http://localhost:8080/gamecast/admin/index.html -> admin/index
 * </pre>
 *
 * @author Rob Harrop
 * @author Juergen Hoeller
 * @since 2.0
 * @see org.springframework.web.servlet.RequestToViewNameTranslator
 * @see org.springframework.web.servlet.ViewResolver
 */
public class DefaultRequestToViewNameTranslator implements RequestToViewNameTranslator {

	private static final String SLASH = "/";


	private String prefix = "";

	private String suffix = "";

	private String separator = SLASH;

	private boolean stripLeadingSlash = true;

	private boolean stripExtension = true;

	private UrlPathHelper urlPathHelper = new UrlPathHelper();


	/**
	 * Set the prefix to prepend to generated view names.
	 * @param prefix the prefix to prepend to generated view names
	 */
	public void setPrefix(String prefix) {
		this.prefix = (prefix != null ? prefix : "");
	}

	/**
	 * Set the suffix to append to generated view names.
	 * @param suffix the suffix to append to generated view names
	 */
	public void setSuffix(String suffix) {
		this.suffix = (suffix != null ? suffix : "");
	}

	/**
	 * Set the value that will replace '<code>/</code>' as the separator
	 * in the view name. The default behavior simply leaves '<code>/</code>'
	 * as the separator.
	 * @param separator the desired separator value
	 */
	public void setSeparator(String separator) {
		this.separator = separator;
	}

	/**
	 * Set whether or not leading slashes should be stripped from the URI when
	 * generating the view name. Default is "true".
	 * @param stripLeadingSlash <code>true</code> if leading slashes are to be stripped
	 */
	public void setStripLeadingSlash(boolean stripLeadingSlash) {
		this.stripLeadingSlash = stripLeadingSlash;
	}

	/**
	 * Set whether or not file extensions should be stripped from the URI when
	 * generating the view name. Default is "true".
	 * @param stripExtension <code>true</code> if file extensions should be stripped
	 */
	public void setStripExtension(boolean stripExtension) {
		this.stripExtension = stripExtension;
	}

	/**
	 * Set if URL lookup should always use the full path within the current servlet
	 * context. Else, the path within the current servlet mapping is used
	 * if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml).
	 * Default is "false".
	 * @param alwaysUseFullPath <code>true</code> if URL lookup should always use the full path
	 * @see org.springframework.web.util.UrlPathHelper#setAlwaysUseFullPath
	 */
	public void setAlwaysUseFullPath(boolean alwaysUseFullPath) {
		this.urlPathHelper.setAlwaysUseFullPath(alwaysUseFullPath);
	}

	/**
	 * Set if the context path and request URI should be URL-decoded.
	 * Both are returned <i>undecoded</i> by the Servlet API,
	 * in contrast to the servlet path.
	 * <p>Uses either the request encoding or the default encoding according
	 * to the Servlet spec (ISO-8859-1).
	 * @see org.springframework.web.util.UrlPathHelper#setUrlDecode
	 */
	public void setUrlDecode(boolean urlDecode) {
		this.urlPathHelper.setUrlDecode(urlDecode);
	}

	/**
	 * Set the {@link org.springframework.web.util.UrlPathHelper} to use for
	 * the resolution of lookup paths.
	 * <p>Use this to override the default UrlPathHelper with a custom subclass,
	 * or to share common UrlPathHelper settings across multiple web components.
	 * @param urlPathHelper the desired helper
	 * @throws IllegalArgumentException if the supplied UrlPathHelper is <code>null</code>
	 */
	public void setUrlPathHelper(UrlPathHelper urlPathHelper) {
		Assert.notNull(urlPathHelper, "UrlPathHelper must not be null");
		this.urlPathHelper = urlPathHelper;
	}


	/**
	 * Translates the request URI of the incoming {@link HttpServletRequest}
	 * into the view name based on the configured parameters.
	 * @see org.springframework.web.util.UrlPathHelper#getLookupPathForRequest
	 * @see #transformPath
	 */
	public String getViewName(HttpServletRequest request) {
		String lookupPath = this.urlPathHelper.getLookupPathForRequest(request);
		return (this.prefix + transformPath(lookupPath) + this.suffix);
	}

	/**
	 * Transform the request URI (in the context of the webapp) stripping
	 * slashes and extensions, and replacing the separator as required.
	 * @param lookupPath the lookup path for the current request,
	 * as determined by the UrlPathHelper
	 * @return the transformed path, with slashes and extensions stripped
	 * if desired
	 */
	protected String transformPath(String lookupPath) {
		String path = lookupPath;
		if (this.stripLeadingSlash && path.startsWith(SLASH)) {
			path = path.substring(1);
		}
		if (this.stripExtension) {
			path = StringUtils.stripFilenameExtension(path);
		}
		if (!SLASH.equals(this.separator)) {
			path = StringUtils.replace(path, SLASH, this.separator);
		}
		return path;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片一区二区| 欧美日韩国产高清一区二区 | 亚洲免费在线看| 国产精品国产精品国产专区不蜜 | 国产成人综合在线播放| 国产激情视频一区二区在线观看| 成人av先锋影音| 欧美色精品在线视频| 欧美视频日韩视频在线观看| 欧美高清激情brazzers| 亚洲免费视频成人| 国产精品一卡二| 欧美一级理论片| 亚洲美女淫视频| 懂色av中文字幕一区二区三区 | 久久久99久久| 精品久久久久久久一区二区蜜臀| 国产精品对白交换视频| 奇米精品一区二区三区在线观看一 | 国产日本欧美一区二区| 亚洲天堂精品视频| 欧美亚日韩国产aⅴ精品中极品| 精品日韩在线观看| 精品综合久久久久久8888| 99久久99久久综合| 国产精品网曝门| 美国十次综合导航| 精品久久人人做人人爰| 免费观看成人av| 久久影院电视剧免费观看| 日韩精品一二三四| 日韩欧美中文一区二区| 蜜桃视频一区二区| 中文字幕av不卡| 国产乱人伦偷精品视频免下载| 久久久久综合网| 国产综合色视频| 欧美高清在线一区二区| 国产精品理论片| 色综合欧美在线视频区| 美女爽到高潮91| 久久精品视频免费观看| 欧美人与z0zoxxxx视频| 亚洲五码中文字幕| 亚欧色一区w666天堂| 日韩午夜激情免费电影| 99精品视频一区二区三区| 国产一区久久久| 午夜伦欧美伦电影理论片| 欧美专区在线观看一区| 成人一区在线观看| 日产欧产美韩系列久久99| 国产在线精品国自产拍免费| 图片区小说区国产精品视频| 国产午夜一区二区三区| 国产精品卡一卡二| 另类专区欧美蜜桃臀第一页| 欧美一级xxx| 欧美大片顶级少妇| 91久久奴性调教| 国产福利91精品一区二区三区| 亚洲大片精品永久免费| 国产欧美一区二区三区在线老狼 | 欧美日韩国产成人在线免费| 91福利小视频| fc2成人免费人成在线观看播放| 国产精品色婷婷久久58| 国产精品水嫩水嫩| 欧美日本韩国一区二区三区视频| 一区二区成人在线| 国产亚洲午夜高清国产拍精品| 欧美久久免费观看| 99精品视频中文字幕| 成人免费视频视频| 色老头久久综合| 国产91清纯白嫩初高中在线观看 | 欧美国产一区二区| 亚洲美女免费视频| 懂色av一区二区三区免费观看| 在线亚洲欧美专区二区| 国产一区二区三区久久悠悠色av| 精品一区二区在线看| 首页综合国产亚洲丝袜| 久久精品久久综合| 波波电影院一区二区三区| 91视视频在线直接观看在线看网页在线看 | 久久精品一区二区| 亚洲精品免费电影| 91丨porny丨蝌蚪视频| 欧美激情中文不卡| 亚洲自拍另类综合| 99国产精品久久久| 亚洲欧美另类久久久精品2019| 国产日韩成人精品| 一区二区中文字幕在线| 亚洲国产精品欧美一二99| 国产不卡视频一区二区三区| 91热门视频在线观看| 一道本成人在线| 久久精品视频免费| 久久久久久**毛片大全| 亚洲精品高清在线| 色综合一个色综合| 精品国产91九色蝌蚪| 亚洲区小说区图片区qvod| 成人理论电影网| 91麻豆精品国产综合久久久久久| 豆国产96在线|亚洲| 91精品国产一区二区人妖| 亚洲激情图片小说视频| 国产精品12区| 日韩免费看网站| 亚洲第一电影网| www.66久久| 日韩av一区二区在线影视| 91蜜桃网址入口| 久久综合九色综合97婷婷女人| 紧缚奴在线一区二区三区| 亚洲欧美激情小说另类| 99国产精品一区| 一区二区免费视频| 日韩美女视频在线| 激情欧美一区二区| 日韩国产精品久久久| www亚洲一区| 欧美群妇大交群的观看方式| 亚洲精品免费电影| 91视视频在线直接观看在线看网页在线看| 国产精品每日更新在线播放网址| 国产精品99久久久久久似苏梦涵| 亚洲成av人影院| www日韩大片| 久久99这里只有精品| 亚洲品质自拍视频| 欧美va亚洲va在线观看蝴蝶网| 国产 日韩 欧美大片| 亚洲精品久久久蜜桃| 欧美极品美女视频| 在线播放91灌醉迷j高跟美女| 日韩高清不卡一区| 性感美女久久精品| 欧美一区二区福利视频| 日韩亚洲欧美成人一区| 成人av免费在线| 无吗不卡中文字幕| 成人免费在线视频| 久久综合成人精品亚洲另类欧美 | 久久精品国产一区二区三| 国产精品视频线看| 欧美韩日一区二区三区| 亚洲一区视频在线| 一区二区三区欧美视频| 亚洲精品日产精品乱码不卡| 日韩精品一区二区三区swag| 日韩视频免费观看高清完整版| 欧美日韩亚洲国产综合| 国产成人精品综合在线观看| 中文字幕精品综合| 亚洲手机成人高清视频| 亚洲成人在线观看视频| 欧美日韩久久久久久| 91香蕉视频黄| 91福利小视频| 中文字幕在线不卡国产视频| 国产精品一区二区视频| 国产精品国产馆在线真实露脸| 久久精品水蜜桃av综合天堂| 久久久精品人体av艺术| 337p粉嫩大胆噜噜噜噜噜91av| 欧美激情一区二区三区不卡 | 亚洲欧美日韩国产另类专区| 久久精品亚洲乱码伦伦中文 | 亚洲国产日日夜夜| 丝袜亚洲另类欧美| 亚洲靠逼com| 午夜视频在线观看一区二区| 亚洲福利一区二区| 蜜臀久久99精品久久久画质超高清 | 色综合中文字幕| 99re66热这里只有精品3直播| heyzo一本久久综合| 日本大香伊一区二区三区| www.99精品| 欧洲精品一区二区三区在线观看| 欧美日韩午夜在线视频| 欧美亚洲动漫精品| 日韩欧美国产不卡| 亚洲欧美国产毛片在线| 日韩激情在线观看| 激情综合网天天干| 91福利在线导航| 亚洲在线视频一区| 寂寞少妇一区二区三区| 欧美性生活大片视频| 中国av一区二区三区| 美女精品自拍一二三四| 欧美三级三级三级| 国产视频不卡一区| 蜜臀91精品一区二区三区| 欧美日韩一区二区在线观看 |