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

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

?? httpservlet.java

?? Java 的servlets和jsp的軟件開發(fā)包。支持jsp1.0以及servlet2.1。版本比較舊
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * not need to override this method.
     *
     *
     *
     * @param req	the {@link HttpServletRequest} object that
     *			contains the request the client made of
     *			the servlet
     *
     *
     * @param resp	the {@link HttpServletResponse} object that
     *			contains the response the servlet returns
     *			to the client				
     *
     *
     * @exception IOException	if an input or output error occurs
     *				while the servlet is handling the
     *				TRACE request
     *
     * @exception ServletException	if the request for the
     *					TRACE cannot be handled
     * 
     * @see 				javax.servlet.Servlet#service
     *
     */

    protected void service (HttpServletRequest req, HttpServletResponse resp)
	throws ServletException, IOException
    {
	String method = req.getMethod ();

	if (method.equals(METHOD_GET)) {
	    long lastModified = getLastModified(req);
	    if (lastModified == -1) {
		// servlet doesn't support if-modified-since, no reason
		// to go through further expensive logic
		doGet(req, resp);
	    } else {
		long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
		if (ifModifiedSince == -1) {
		    // if the client didn't ask for a if-modifed-since
		    // no need to go further -- just do it.
		    doGet(req, resp);
		} else {
		    // this is the most expensive path through
		    // but we know we need to do it at this point
		    maybeSetLastModified (resp, lastModified);
		    long now = System.currentTimeMillis();
		    if (now < ifModifiedSince ||
			ifModifiedSince < lastModified) {
			doGet(req, resp);
		    } else {
			// XXX
			// this is more of a message than an error, but
			// sendError does the job just fine. Maybe we
			// should have a response.sendMessage or some
			// such in a future api rev...
			resp.sendError(HttpServletResponse.SC_NOT_MODIFIED);
		    }
		}
	    }

	} else if (method.equals (METHOD_HEAD)) {
	    long lastModified = getLastModified (req);
	    maybeSetLastModified (resp, lastModified);
	    doHead (req, resp);

	} else if (method.equals (METHOD_POST)) {
	    doPost (req, resp);
	    
	} else if (method.equals (METHOD_PUT)) {
	    doPut(req, resp);	
	    
	} else if (method.equals (METHOD_DELETE)) {
	    doDelete(req, resp);
	    
	} else if (method.equals (METHOD_OPTIONS)) {
	    doOptions(req,resp);
	    
	} else if (method.equals (METHOD_TRACE)) {
	    doTrace(req,resp);
	    
	} else {
	    //
	    // Note that this means NO servlet supports whatever
	    // method was requested, anywhere on this server.
	    //

	    String errMsg = lStrings.getString("http.method_not_implemented");
	    Object[] errArgs = new Object[1];
	    errArgs[0] = method;
	    errMsg = MessageFormat.format(errMsg, errArgs);
	    
	    resp.sendError (HttpServletResponse.SC_NOT_IMPLEMENTED, errMsg);
	}
    }
    




    /*
     * Sets the Last-Modified entity header field, if it has not
     * already been set and if the value is meaningful.  Called before
     * doGet, to ensure that headers are set before response data is
     * written.  A subclass might have set this header already, so we
     * check.
     */

    private void maybeSetLastModified (HttpServletResponse resp,
				       long lastModified) {
	if (resp.containsHeader(HEADER_LASTMOD))
	    return;
	if (lastModified >= 0)
	    resp.setDateHeader(HEADER_LASTMOD, lastModified);
    }
   
   
   
    
    /**
     *
     * Dispatches client requests to the protected
     * <code>service</code> method. You will usually not
     * override this method.
     *
     * 
     * @param req	the {@link HttpServletRequest} object that
     *			contains the request the client made of
     *			the servlet
     *
     *
     * @param resp	the {@link HttpServletResponse} object that
     *			contains the response the servlet returns
     *			to the client				
     *
     *
     * @exception IOException	if an input or output error occurs
     *				while the servlet is handling the
     *				TRACE request
     *
     * @exception ServletException	if the request for the
     *					TRACE cannot be handled
     *
     * 
     * @see javax.servlet.Servlet#service
     *
     */

    public void service(ServletRequest req, ServletResponse res)
	throws ServletException, IOException
    {
	HttpServletRequest	request;
	HttpServletResponse	response;
	
	try {
	    request = (HttpServletRequest) req;
	    response = (HttpServletResponse) res;
	} catch (ClassCastException e) {
	    throw new ServletException ("non-HTTP request or response");
	}
	service (request, response);
    }
}




/*
 * A response that includes no body, for use in (dumb) "HEAD" support.
 * This just swallows that body, counting the bytes in order to set
 * the content length appropriately.  All other methods delegate directly
 * to the HTTP Servlet Response object used to construct this one.
 */
// file private
class NoBodyResponse implements HttpServletResponse {
    private HttpServletResponse		resp;
    private NoBodyOutputStream		noBody;
    private PrintWriter			writer;
    private boolean			didSetContentLength;

    // file private
    NoBodyResponse (HttpServletResponse r) {
	resp = r;
	noBody = new NoBodyOutputStream ();
    }

    // file private
    void setContentLength () {
	if (!didSetContentLength)
	  resp.setContentLength (noBody.getContentLength ());
    }


    // SERVLET RESPONSE interface methods

    public void setContentLength (int len) {
	resp.setContentLength (len);
	didSetContentLength = true;
    }

    public void setContentType (String type)
      { resp.setContentType (type); }

    public ServletOutputStream getOutputStream () throws IOException
      { return noBody; }

    public String getCharacterEncoding ()
	{ return resp.getCharacterEncoding (); }

    public PrintWriter getWriter () throws UnsupportedEncodingException
    {
	if (writer == null) {
	    OutputStreamWriter	w;

	    w = new OutputStreamWriter (noBody, getCharacterEncoding ());
	    writer = new PrintWriter (w);
	}
	return writer;
    }


    // HTTP SERVLET RESPONSE interface methods

    public void addCookie(Cookie cookie)
      { resp.addCookie(cookie); }

    public boolean containsHeader (String name)
      { return resp.containsHeader (name); }

    public void setStatus (int sc, String sm)
      { resp.setStatus (sc, sm); }

    public void setStatus (int sc)
      { resp.setStatus (sc); }

    public void setHeader (String name, String value)
      { resp.setHeader (name, value); }

    public void setIntHeader (String name, int value)
      { resp.setIntHeader (name, value); }

    public void setDateHeader (String name, long date)
      { resp.setDateHeader (name, date); }

    public void sendError (int sc, String msg) throws IOException
      { resp.sendError (sc, msg); }

    public void sendError (int sc) throws IOException
      { resp.sendError (sc); }

    public void sendRedirect (String location) throws IOException
      { resp.sendRedirect (location); }
    
    public String encodeURL (String url) 
      { return resp.encodeURL(url); }

    public String encodeRedirectURL (String url)
      { return resp.encodeRedirectURL(url); }
      
      
      
      

    /**
     * @deprecated	As of Version 2.0, replaced by
     * 			{@link HttpServletResponse#encodeURL}.
     *
     */
     
     
    public String encodeUrl (String url) 
      { return this.encodeURL(url); }
      
      
      
      
      
      
      

    /**
     * @deprecated	As of Version 2.0, replaced by
     *			{@link HttpServletResponse#encodeRedirectURL}.
     *
     */
     
     
    public String encodeRedirectUrl (String url)
      { return this.encodeRedirectURL(url); }

}







/*
 * Servlet output stream that gobbles up all its data.
 */
 
// file private
class NoBodyOutputStream extends ServletOutputStream {

    private static final String LSTRING_FILE =
	"javax.servlet.http.LocalStrings";
    private static ResourceBundle lStrings =
	ResourceBundle.getBundle(LSTRING_FILE);

    private int		contentLength = 0;

    // file private
    NoBodyOutputStream () {}

    // file private
    int getContentLength () {
	return contentLength;
    }

    public void write (int b) {
	contentLength++;
    }

    public void write (byte buf [], int offset, int len)
	throws IOException
    {
	if (len >= 0) {
	    contentLength += len;
	} else {
	    // XXX
	    // isn't this really an IllegalArgumentException?
	    
	    String msg = lStrings.getString("err.io.negativelength");
	    throw new IOException ("negative length");
	}
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一卡二卡三卡四卡无卡| 久久精品欧美日韩精品| 亚洲一区成人在线| 欧美日韩国产首页| 日韩精品一级二级 | 国产日韩欧美不卡在线| 成人性生交大片免费| 成人免费一区二区三区视频 | 国产亚洲综合性久久久影院| 国产不卡一区视频| 亚洲精品视频在线观看免费| 欧美性videosxxxxx| 日本va欧美va精品| 欧美韩国日本综合| 欧美色大人视频| 国内成人免费视频| 亚洲欧美另类久久久精品2019| 欧美日韩大陆在线| 国产精品一区二区在线观看网站| 日韩一区欧美一区| 欧美一级国产精品| 不卡的电视剧免费网站有什么| 亚洲永久精品大片| 久久这里只有精品视频网| 99精品久久99久久久久| 免费精品视频在线| 成人免费一区二区三区在线观看| 69堂精品视频| 成人午夜精品在线| 视频在线观看国产精品| 国产精品女同一区二区三区| 欧美久久久久久久久久| 国产suv精品一区二区三区| 亚洲va中文字幕| 国产精品久久久久久久久免费樱桃 | 亚洲人成电影网站色mp4| 欧美一级爆毛片| 色久综合一二码| 国产在线播放一区三区四| 一区二区三区在线观看视频| 久久影院电视剧免费观看| 欧美在线观看禁18| 成人免费观看男女羞羞视频| 麻豆久久久久久久| 一区二区在线看| 国产欧美一区二区在线| 欧美成va人片在线观看| 欧美在线你懂得| 91视频一区二区三区| 国产乱子轮精品视频| 日本大胆欧美人术艺术动态| 亚洲欧美日韩精品久久久久| 国产性色一区二区| 精品国产乱码久久久久久久久| 欧美日韩在线直播| 色呦呦网站一区| 不卡电影一区二区三区| 国产一区二区久久| 久久国产综合精品| 日韩va亚洲va欧美va久久| 中文字幕在线观看一区二区| 国产三级欧美三级| 精品久久久久久综合日本欧美| 欧美卡1卡2卡| 欧美日韩一区二区三区不卡| 色综合一区二区三区| 99久久精品国产一区二区三区| 大陆成人av片| 成人午夜免费视频| www.亚洲人| 99精品在线观看视频| av在线这里只有精品| 99久久精品久久久久久清纯| 波多野结衣一区二区三区| 成人免费视频免费观看| 成人av集中营| 91在线视频播放地址| 色婷婷精品大在线视频| 色婷婷综合视频在线观看| 91成人在线精品| 欧美性生活久久| 欧美日韩国产美| 日韩精品一区二区三区四区| 欧美精品一区二区三区四区| 久久亚洲一级片| 国产精品色噜噜| 亚洲欧美福利一区二区| 亚洲五码中文字幕| 日本三级亚洲精品| 麻豆91精品91久久久的内涵| 极品少妇xxxx精品少妇偷拍| 国产成人欧美日韩在线电影| aa级大片欧美| 欧美日韩国产高清一区二区| 日韩一区二区高清| 久久久精品国产免大香伊| 国产精品久久久久四虎| 亚洲午夜私人影院| 日本一道高清亚洲日美韩| 国产制服丝袜一区| 成人亚洲一区二区一| 在线观看一区二区精品视频| 日韩一级大片在线| 中文成人av在线| 婷婷综合另类小说色区| 国产精品 日产精品 欧美精品| 99re这里只有精品视频首页| 欧美肥妇free| 久久久高清一区二区三区| 亚洲乱码日产精品bd| 免费久久精品视频| 99精品国产视频| 日韩欧美三级在线| 3atv一区二区三区| 韩国av一区二区三区四区| 国产精品女人毛片| 欧美熟乱第一页| 在线电影国产精品| 欧美国产综合色视频| 亚洲成人综合在线| 国产成人自拍高清视频在线免费播放| 99精品久久久久久| 精品国产sm最大网站| 亚洲欧洲精品一区二区三区不卡| 视频一区免费在线观看| 国产精品一区二区视频| 欧美老年两性高潮| 中文字幕一区二区三区在线观看| 男女男精品网站| 欧美亚洲一区二区三区四区| 久久久久高清精品| 免费成人在线网站| 欧美午夜不卡视频| 欧美激情一区在线| 久久er99热精品一区二区| 日本丰满少妇一区二区三区| 久久婷婷综合激情| 无码av免费一区二区三区试看| 粉嫩一区二区三区在线看| 欧美一区在线视频| 夜夜亚洲天天久久| 91性感美女视频| 国产无一区二区| 久久福利视频一区二区| 欧美日韩一区二区三区不卡| 亚洲图片另类小说| 丁香激情综合五月| 精品国产1区2区3区| 天天色图综合网| 欧美天堂一区二区三区| 亚洲欧美另类图片小说| 成人激情黄色小说| 国产精品美女视频| 国产999精品久久久久久绿帽| 欧美va亚洲va在线观看蝴蝶网| 亚洲一区免费观看| 欧美色手机在线观看| 一区二区三区不卡视频| 色婷婷狠狠综合| 亚洲蜜臀av乱码久久精品蜜桃| 不卡影院免费观看| 国产精品久久久久久久久搜平片 | 亚洲一级在线观看| 91久久线看在观草草青青| 日韩美女视频一区二区| caoporn国产一区二区| 国产日韩欧美精品在线| 国产剧情在线观看一区二区| 久久久精品免费网站| 国产suv精品一区二区883| 国产精品日韩成人| 波多野结衣亚洲一区| 18欧美乱大交hd1984| 色婷婷久久综合| 亚洲chinese男男1069| 91麻豆精品国产自产在线观看一区| 亚洲国产精品久久久久婷婷884 | 精品亚洲国内自在自线福利| 久久亚洲综合色| 成人av在线看| 亚洲在线视频一区| 91精品久久久久久久久99蜜臂 | 免费成人在线视频观看| 精品国产乱码久久久久久图片| 国产乱人伦偷精品视频免下载| 国产欧美在线观看一区| 91免费视频网址| 亚洲国产毛片aaaaa无费看| 日韩精品一区二区三区中文精品 | 一区二区中文视频| 在线免费视频一区二区| 蜜桃一区二区三区在线观看| 久久―日本道色综合久久| 高清国产一区二区| 亚洲一区二区在线观看视频| 欧美电视剧在线观看完整版| 国产不卡视频一区二区三区| 亚洲国产日韩a在线播放| 精品人在线二区三区| www.亚洲精品|