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

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

?? https.java

?? 非常接近C/S操作方式的Java Ajax框架-ZK 用ZK框架使你的B/S應(yīng)用程序更漂亮更易操作。 官網(wǎng):www.zkoss.org
?? JAVA
字號(hào):
/* Https.java{{IS_NOTE	Purpose: 	Description: 	History:	2001/11/29 13:53:05, Create, Tom M. Yeh.}}IS_NOTECopyright (C) 2001 Potix Corporation. All Rights Reserved.{{IS_RIGHT	This program is distributed under GPL Version 2.0 in the hope that	it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.web.servlet.http;import java.io.IOException;import java.util.Date;import java.util.Locale;import java.util.Map;import java.text.SimpleDateFormat;import java.text.ParseException;import javax.servlet.ServletContext;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.http.HttpSession;import javax.servlet.http.Cookie;import org.zkoss.lang.D;import org.zkoss.lang.SystemException;import org.zkoss.util.logging.Log;import org.zkoss.web.Attributes;import org.zkoss.web.servlet.Servlets;import org.zkoss.web.util.resource.ExtendedWebContext;/** * The utilities relevant to servlets. * * @author tomyeh */public class Https extends Servlets {	private static final Log log = Log.lookup(Https.class);	/**	 * Gets the complete server name, including protocol, server, and ports.	 * Example, http://mysite.com:8080	 */	public static final String getCompleteServerName(HttpServletRequest hreq) {		final StringBuffer sb = hreq.getRequestURL();		final String ctx = hreq.getContextPath();		final int j = sb.indexOf(ctx);		if (j < 0)			throw new SystemException("Unknown request: url="+sb+", ctx="+ctx);		return sb.delete(j, sb.length()).toString();	}	/**	 * Gets the complete context path, including protocol, server, ports, and 	 * context.	 * Example, http://mysite.com:8080/we	 */	public static final String getCompleteContext(HttpServletRequest hreq) {		final StringBuffer sb = hreq.getRequestURL();		final String ctx = hreq.getContextPath();		final int j = sb.indexOf(ctx);		if (j < 0)			throw new SystemException("Unknown request: url="+sb+", ctx="+ctx);		return sb.delete(j + ctx.length(), sb.length()).toString();	}	/** Gets the value of the specified cookie, or null if not found.	 * @param name the cookie's name	 */	public static final	String getCookieValue(HttpServletRequest request, String name) {		final Cookie[] cookies = request.getCookies();		if (cookies != null) {			for (int j = cookies.length; --j >= 0;) {				if (cookies[j].getName().equals(name))					return cookies[j].getValue();			}		}		return null;	}	/**	 * Returns the servlet uri of the request.	 * A servlet uri is getServletPath() + getPathInfo().	 * In other words, a servlet uri is a request uri without the context path.	 * <p>However, HttpServletRequest.getRequestURI returns in encoded format,	 * while this method returns in decode format (i.e., %nn is converted).	 */	public static final String getServletURI(HttpServletRequest request) {		final String sp = request.getServletPath();		final String pi = request.getPathInfo();		if (pi == null || pi.length() == 0)			return sp;		if (sp.length() == 0)			return pi;		return sp + pi;	}	/**	 * Gets the context path of this page.	 * Unlike getContextPath, it detects whether the current page is included.	 *	 * @return "/" if request is not a http request	 */	public static final String getThisContextPath(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.INCLUDE_CONTEXT_PATH);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getContextPath(): "";	}	/**	 * Gets the servlet path of this page.	 * Unlike getServletPath, it detects whether the current page is included.	 *	 * @return "/" if request is not a http request	 */	public static final String getThisServletPath(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.INCLUDE_SERVLET_PATH);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getServletPath(): "/";	}	/**	 * Gets the request URI of this page.	 * Unlike getRequestURI, it detects whether the current page is included.	 *	 * @return "/" if request is not a http request	 */	public static final String getThisRequestURI(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.INCLUDE_REQUEST_URI);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getRequestURI(): "/";	}	/**	 * Gets the query string of this page.	 * Unlike getQueryString, it detects whether the current page is included.	 *	 * @return null if request is not a http request	 */	public static final String getThisQueryString(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.INCLUDE_QUERY_STRING);		return path != null ? path:			isIncluded(request) ? null: //null is valid even included			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getQueryString(): null;	}	/**	 * Gets the path info of this page.	 * Unlike getPathInfo, it detects whether the current page is included.	 *	 * @return null if request is not a http request	 */	public static final String getThisPathInfo(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.INCLUDE_PATH_INFO);		return path != null ? path:			isIncluded(request) ? null: //null is valid even included			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getPathInfo(): null;	}	/**	 * Gets the original context path regardless of being forwarded or not.	 * Unlike getContextPath, it won't be affected by forwarding.	 */	public static final String getOriginContextPath(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.FORWARD_CONTEXT_PATH);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getContextPath(): "";	}	/**	 * Gets the original servlet path regardless of being forwarded or not.	 * Unlike getServletPath, it won't be affected by forwarding.	 */	public static final String getOriginServletPath(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.FORWARD_SERVLET_PATH);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getServletPath(): "/";	}	/**	 * Gets the request URI regardless of being forwarded or not.	 * Unlike HttpServletRequest.getRequestURI,	 * it won't be affected by forwarding.	 */	public static final String getOriginRequestURI(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.FORWARD_REQUEST_URI);		return path != null ? path:			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getRequestURI(): "/";	}	/**	 * Gets the path info regardless of being forwarded or not.	 * Unlike getPathInfo, it won't be affected by forwarding.	 */	public static final String getOriginPathInfo(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.FORWARD_QUERY_STRING);		return path != null ? path:			isForwarded(request) ? null: //null is valid even included			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getQueryString(): null;	}	/**	 * Gets the query string regardless of being forwarded or not.	 * Unlike getQueryString, it won't be affected by forwarding.	 */	public static final String getOriginQueryString(ServletRequest request) {		String path = (String)request.getAttribute(Attributes.FORWARD_PATH_INFO);		return path != null ? path:			isForwarded(request) ? null: //null is valid even included			request instanceof HttpServletRequest ?				((HttpServletRequest)request).getPathInfo(): null;	}	/** Returns the servlet path + path info + query string.	 * Because the path info is decoded, the return string can be considered	 * as decoded. On the other hand {@link #getOriginFullRequest} is in	 * the encoded form.	 * @see #getOriginFullRequest	 */	public static final String getOriginFullServlet(ServletRequest request) {		final String qstr = getOriginQueryString(request);		final String pi = getOriginPathInfo(request);		if (qstr == null && pi == null)			return getOriginServletPath(request);		final StringBuffer sb =			new StringBuffer(80).append(getOriginServletPath(request));		if (pi != null) sb.append(pi);		if (qstr != null) sb.append('?').append(qstr);		return sb.toString();	}	/** Returns the request uri + query string.	 * Unlik {@link #getOriginFullServlet}, this is in the encoded form	 * (e.g., %nn still exists, if any).	 * Note: request uri = context path + servlet path + path info.	 */	public static final String getOriginFullRequest(ServletRequest request) {		final String qstr = getOriginQueryString(request);		return qstr != null ? getOriginRequestURI(request) + '?' + qstr:			getOriginRequestURI(request);	}	/**	 * Redirects to another URL by prefixing the context path and	 * encoding with encodeRedirectURL.	 *	 * <p>It encodes the URI automatically (encodeRedirectURL).	 * Parameters are encoded by	 * {@link Encodes#setToQueryString(StringBuffer,Map)}.	 *	 * <p>Like {@link Encodes#encodeURL}, the servlet context is	 * prefixed if uri starts with "/". In other words, to redirect other	 * application, the complete URL must be used, e.g., http://host/other.	 *	 * <p>Also, HttpServletResponse.encodeRedirectURL is called automatically.	 *	 * @param request the request; used only if params is not null	 * @param response the response	 * @param uri the redirect uri (not encoded; not including context-path),	 * or null to denote {@link #getOriginFullServlet}	 * It is OK to relevant (without leading '/').	 * If starts with "/", the context path of request is assumed.	 * To reference to foreign context, use "~ctx/" where ctx is the	 * context path of the foreign context (without leading '/').	 * @param params the attributes that will be set when the redirection	 * is back; null to ignore; format: (String, Object)	 * @param mode one of {@link #OVERWRITE_URI}, {@link #IGNORE_PARAM},	 * and {@link #APPEND_PARAM}. It defines how to handle if both uri	 * and params contains the same parameter.	 */	public static final void sendRedirect(ServletContext ctx,	HttpServletRequest request, HttpServletResponse response,	String uri, Map params, int mode)	throws IOException, ServletException {		final String encodedUrl =			encodeRedirectURL(ctx, request, response, uri, params, mode);		if (D.ON && log.debugable()) log.debug("redirect to " + encodedUrl);		response.sendRedirect(encodedUrl);	}	/** Encodes an URL such that it can be used with HttpServletResponse.sendRedirect.	 */	public static final String encodeRedirectURL(ServletContext ctx, 	HttpServletRequest request, HttpServletResponse response,	String uri, Map params, int mode) {		if (uri == null) {			uri = request.getContextPath() + getOriginFullServlet(request);		} else {			final int len = uri.length();			if (len ==0 || uri.charAt(0) == '/') {				uri = request.getContextPath() + uri;			} else if (uri.charAt(0) == '~') {				final int j = uri.indexOf('/', 1);				final String ctxroot =					j >= 0 ? "/" + uri.substring(1, j): "/" + uri.substring(1);				final ExtendedWebContext extctx =					Servlets.getExtendedWebContext(ctx, ctxroot.substring(1));				if (extctx != null) {					uri = j >= 0 ? uri.substring(j): "/";					return extctx.encodeRedirectURL(						request, response, uri, params, mode);				} else {					uri = len >= 2 && uri.charAt(1) == '/' ?						uri.substring(1): '/' + uri.substring(1);				}			}		}		return response.encodeRedirectURL(generateURI(uri, params, mode));			}	/**	 * Converts a date string to a Date instance.	 * The format of the giving date string must be complaint	 * to HTTP proptocol.	 *	 * @exception ParseException if the string is not valid	 */	public static final Date toDate(String sdate) throws ParseException {		for (int j = 0;;) {			try {				synchronized (_dateFmts[j]) {					return _dateFmts[j].parse(sdate);				}			} catch (ParseException ex) {				if (++j == _dateFmts.length)					throw ex;			}		}	}	/**	 * Converts a data to a string complaint to HTTP protocol.	 */	public static final String toString(Date date) {		synchronized (_dateFmts[0]) {			return _dateFmts[0].format(date);		}	}	private static final SimpleDateFormat _dateFmts[] = {		new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US),		new SimpleDateFormat("EEEEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US),		new SimpleDateFormat("EEE MMMM d HH:mm:ss yyyy", Locale.US)	};}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲va欧美va人人爽午夜| 麻豆专区一区二区三区四区五区| 欧美日韩视频第一区| 狠狠色丁香久久婷婷综合_中| 伊人色综合久久天天人手人婷| 精品国产91久久久久久久妲己 | 亚洲成人综合网站| 久久久不卡网国产精品一区| 欧美精品电影在线播放| 99精品欧美一区二区三区小说| 美女视频网站黄色亚洲| 亚洲午夜av在线| 17c精品麻豆一区二区免费| 久久综合给合久久狠狠狠97色69| 欧美三级蜜桃2在线观看| 成人av网站在线观看免费| 精品在线一区二区三区| 日韩精品91亚洲二区在线观看| 亚洲男女毛片无遮挡| 日本一区二区三区电影| 精品免费日韩av| 欧美一二三四在线| 制服视频三区第一页精品| 在线观看亚洲精品视频| 91免费看`日韩一区二区| 国产成人精品免费在线| 国产真实乱子伦精品视频| 蜜桃精品视频在线| 日韩电影免费在线看| 亚洲国产综合色| 一区二区三区在线视频免费观看| 最新高清无码专区| 136国产福利精品导航| 国产欧美日韩中文久久| 国产视频一区不卡| 国产午夜精品在线观看| 国产午夜亚洲精品午夜鲁丝片| 久久精品夜色噜噜亚洲aⅴ| 精品久久久久99| 久久午夜羞羞影院免费观看| 久久久久9999亚洲精品| 日本一区二区三区视频视频| 欧美韩国日本一区| 中文字幕欧美激情| 中文字幕一区二区三区av| 亚洲欧洲成人精品av97| 亚洲免费在线视频一区 二区| 自拍偷拍欧美激情| ...av二区三区久久精品| 日韩毛片视频在线看| 亚洲精品大片www| 亚洲国产视频在线| 男人的天堂久久精品| 国产一区视频在线看| 国产 欧美在线| 色婷婷精品大在线视频| 777亚洲妇女| 精品国一区二区三区| 久久久久久久久久久黄色| 国产精品毛片大码女人| 亚洲精品久久7777| 性欧美疯狂xxxxbbbb| 乱一区二区av| 99视频国产精品| 欧美男女性生活在线直播观看| 欧美一级黄色片| 亚洲国产精品t66y| 亚洲一级不卡视频| 免费观看在线色综合| 成人性生交大片免费| 精品视频在线看| 911精品国产一区二区在线| 欧美一级黄色大片| 国产精品国产三级国产aⅴ无密码| 亚洲愉拍自拍另类高清精品| 美日韩一区二区三区| 成人av小说网| 日韩写真欧美这视频| 国产精品免费视频网站| 日韩和的一区二区| 从欧美一区二区三区| 欧美日韩国产首页在线观看| 久久久久高清精品| 亚洲成人一二三| 丰满亚洲少妇av| 69精品人人人人| 国产精品伦理一区二区| 日本美女一区二区三区| 99精品国产99久久久久久白柏| 91精品国产色综合久久久蜜香臀| 中文字幕第一区二区| 蜜臀av一区二区| 色综合天天综合网天天看片 | 亚洲日韩欧美一区二区在线| 美女网站色91| 欧美最猛黑人xxxxx猛交| 久久久久亚洲蜜桃| 日本欧美一区二区三区乱码| 91小视频在线免费看| 国产欧美精品一区二区色综合朱莉| 亚洲成人在线网站| 一本久道中文字幕精品亚洲嫩| 久久中文娱乐网| 日本不卡视频在线观看| 欧亚一区二区三区| 国产精品福利影院| 国产一区二区不卡在线| 4438x成人网最大色成网站| 亚洲欧美激情小说另类| 成人小视频在线观看| 久久综合九色综合97婷婷女人| 午夜国产不卡在线观看视频| 91成人在线免费观看| 亚洲欧洲日韩av| 成人综合婷婷国产精品久久蜜臀| 91精品福利在线| 精品国产人成亚洲区| 日韩国产一区二| 欧美理论在线播放| 一区二区免费视频| 99久久er热在这里只有精品15 | 日韩一区中文字幕| 国产丶欧美丶日本不卡视频| 精品国精品国产尤物美女| 日韩电影在线免费| 91精品午夜视频| 日日摸夜夜添夜夜添精品视频| 在线观看免费一区| 亚洲伊人伊色伊影伊综合网| 91伊人久久大香线蕉| 《视频一区视频二区| 91视频一区二区三区| 亚洲天堂免费看| 91丨porny丨国产入口| 最新热久久免费视频| 91视视频在线直接观看在线看网页在线看| 国产精品麻豆99久久久久久| caoporm超碰国产精品| 亚洲日本欧美天堂| 日本精品裸体写真集在线观看 | 青青草97国产精品免费观看无弹窗版| 欧美特级限制片免费在线观看| 亚洲精品乱码久久久久久| 欧美性一级生活| 亚洲va欧美va国产va天堂影院| 欧美理论片在线| 老司机精品视频导航| 26uuu国产电影一区二区| 国产成人欧美日韩在线电影| 欧美国产日韩亚洲一区| 99久久99久久综合| 亚洲一区二区三区四区中文字幕| 777久久久精品| 国产麻豆日韩欧美久久| 国产精品天美传媒| 在线免费观看日本欧美| 日产国产欧美视频一区精品| 久久一夜天堂av一区二区三区| 国产高清精品在线| 亚洲日本一区二区三区| 欧美日韩国产免费一区二区 | 亚洲一区在线观看网站| 欧美一区二区三区在线观看视频| 国产一区啦啦啦在线观看| 自拍偷自拍亚洲精品播放| 欧美久久久久中文字幕| 国产乱人伦偷精品视频不卡| 亚洲激情校园春色| 在线播放中文一区| 高清av一区二区| 亚洲高清免费在线| 久久综合av免费| 在线亚洲欧美专区二区| 裸体健美xxxx欧美裸体表演| 国产精品久久久爽爽爽麻豆色哟哟 | 91黄色激情网站| 久久国产精品色| 亚洲欧美另类久久久精品| 日韩一区二区精品葵司在线| av不卡在线播放| 麻豆精品一区二区三区| 亚洲视频电影在线| 日韩一卡二卡三卡国产欧美| 97久久精品人人澡人人爽| 日本成人在线网站| 国产精品二区一区二区aⅴ污介绍| 9191精品国产综合久久久久久| 成人午夜av电影| 男人操女人的视频在线观看欧美| 综合网在线视频| xnxx国产精品| 在线不卡欧美精品一区二区三区| 不卡电影一区二区三区| 精品伊人久久久久7777人| 亚洲美女淫视频| 亚洲国产精品二十页| 日韩免费看的电影| 欧美三级一区二区| 99久久er热在这里只有精品15| 国产乱人伦偷精品视频免下载|