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

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

?? httpservlet.java

?? 使用java語言編寫的小應(yīng)用程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * @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 < (lastModified / 1000 * 1000)) {
		    // If the servlet mod time is later, call doGet()
                    // Round down to the nearest second for a proper compare
                    // A ifModifiedSince of -1 will always be less
		    maybeSetLastModified(resp, lastModified);
		    doGet(req, resp);
		} else {
		    resp.setStatus(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. There's no 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
     *
     */

    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;
    }

    public void setBufferSize(int size) throws IllegalStateException
      { resp.setBufferSize(size); }

    public int getBufferSize()
      { return resp.getBufferSize(); }

    public void reset() throws IllegalStateException
      { resp.reset(); }

    public boolean isCommitted()
      { return resp.isCommitted(); }

    public void flushBuffer() throws IOException
      { resp.flushBuffer(); }

    public void setLocale(Locale loc)
      { resp.setLocale(loc); }

    public Locale getLocale()
      { return resp.getLocale(); }


    // HTTP SERVLET RESPONSE interface methods

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

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

    /** @deprecated */
    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); }
      
    public void addHeader(String name, String value)
      { resp.addHeader(name, value); }
      
    public void addDateHeader(String name, long value)
      { resp.addDateHeader(name, value); }
      
    public void addIntHeader(String name, int value)
      { resp.addIntHeader(name, value); }
      
      
      

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

    /**
     * @deprecated	As of Version 2.1, 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");
	}
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区电影在线| 久久无码av三级| 顶级嫩模精品视频在线看| 夜夜揉揉日日人人青青一国产精品| 精品国产免费一区二区三区四区| 国产精品性做久久久久久| 图片区小说区区亚洲影院| 国产日韩欧美在线一区| 欧美精品777| 日本道色综合久久| 99这里只有久久精品视频| 毛片基地黄久久久久久天堂| 一区二区三区美女| 中文字幕av一区二区三区免费看| 欧美成人三级电影在线| 欧美久久一区二区| 91福利区一区二区三区| 99久久99久久综合| 国产成人免费视频精品含羞草妖精 | 亚洲高清免费视频| 亚洲少妇中出一区| 中文字幕一区二区三区在线观看| 久久久三级国产网站| 日韩欧美精品在线视频| 91精品欧美久久久久久动漫| 色国产精品一区在线观看| 成人av资源网站| 成人午夜电影久久影院| 国产成人精品午夜视频免费| 国产成人综合在线| 国产伦精一区二区三区| 国内精品久久久久影院色| 奇米精品一区二区三区四区 | 麻豆国产精品777777在线| 天天影视网天天综合色在线播放| 亚洲精品亚洲人成人网在线播放| 亚洲精品第1页| 一区二区三区在线播| 亚洲一区在线免费观看| 亚洲免费观看高清在线观看| 亚洲欧美色综合| 亚洲精品日产精品乱码不卡| 亚洲激情五月婷婷| 亚洲激情中文1区| 亚洲香蕉伊在人在线观| 亚洲va韩国va欧美va精品| 日韩av一区二区三区四区| 麻豆精品精品国产自在97香蕉| 精品综合久久久久久8888| 国产69精品久久久久777| 成人白浆超碰人人人人| 91久久精品网| 欧美一区二区美女| 久久婷婷成人综合色| 亚洲国产精品精华液2区45| 亚洲色图欧美偷拍| 午夜av区久久| 久草这里只有精品视频| 国产福利精品一区| 色www精品视频在线观看| 欧美精三区欧美精三区| 欧美xfplay| 亚洲国产精品ⅴa在线观看| 一区二区三区日本| 男男gaygay亚洲| 国产成人亚洲综合a∨婷婷| 91香蕉视频污| 欧美视频三区在线播放| 日韩欧美久久一区| 国产精品福利av| 日日噜噜夜夜狠狠视频欧美人 | 国内精品久久久久影院色 | 欧美变态tickle挠乳网站| 国产视频亚洲色图| 亚洲一区二区三区美女| 狠狠狠色丁香婷婷综合激情 | 久久精品免费看| av激情综合网| 在线综合视频播放| 中文字幕精品—区二区四季| 亚洲午夜私人影院| 国产精品996| 欧美三级乱人伦电影| 久久久99精品免费观看| 亚洲一线二线三线视频| 国内精品视频666| 精品污污网站免费看| 国产日产欧美一区| 图片区小说区区亚洲影院| 成年人网站91| 日韩精品中文字幕一区| 一区二区三区在线高清| 国产99久久久精品| 欧美一区二区在线视频| 亚洲人成网站色在线观看| 国产一区二区美女| 欧美精品亚洲二区| 亚洲裸体在线观看| 国产黑丝在线一区二区三区| 欧美日韩成人综合天天影院| 国产精品久久久久久一区二区三区 | 亚洲二区在线视频| 99九九99九九九视频精品| 欧美精品一区二区三区蜜桃| 亚洲一区视频在线| 成人精品电影在线观看| 日韩一区二区三区观看| 亚洲大片精品永久免费| 91麻豆免费在线观看| 国产欧美在线观看一区| 久久精品国产久精国产| 欧美挠脚心视频网站| 亚洲日本va午夜在线电影| 国产69精品一区二区亚洲孕妇| 欧美电视剧在线看免费| 日本亚洲最大的色成网站www| 91福利视频在线| 亚洲激情av在线| 97精品久久久久中文字幕| 中文字幕va一区二区三区| 国产成人综合在线播放| 久久色中文字幕| 精品一区二区影视| 欧美tk—视频vk| 久久99精品久久久久久动态图| 欧美猛男gaygay网站| 亚洲一区二区在线观看视频| 色婷婷精品大在线视频| 亚洲精品国产第一综合99久久| 91污在线观看| 一区二区三区四区在线免费观看 | 国产日韩欧美一区二区三区乱码| 不卡免费追剧大全电视剧网站| 99久久伊人精品| 久久精品人人做人人爽97| 激情小说亚洲一区| 欧美精品一区二区三区高清aⅴ| 蜜臀av在线播放一区二区三区 | 成人av网站在线观看免费| 国产亚洲一区二区三区四区 | 成人污污视频在线观看| 中文字幕在线观看一区| 99久久精品国产麻豆演员表| 亚洲欧美日韩中文播放| 欧美亚洲国产一区二区三区| 午夜激情久久久| 欧美顶级少妇做爰| 午夜国产精品影院在线观看| 日韩午夜精品视频| 精品一区二区精品| 欧美激情综合网| 97久久精品人人做人人爽50路| 亚洲一区二区三区四区中文字幕| 欧美日韩在线一区二区| 视频一区视频二区中文字幕| 精品av久久707| 成人美女在线视频| 亚洲午夜免费电影| 日韩欧美国产综合一区| 国产盗摄一区二区三区| 国产精品国产三级国产a| 欧美在线免费观看亚洲| 日韩电影免费在线看| 欧美成人三级在线| av亚洲精华国产精华| 亚洲1区2区3区4区| 久久精品水蜜桃av综合天堂| 99久久伊人精品| 琪琪一区二区三区| 国产欧美精品国产国产专区| 在线精品视频一区二区| 美女视频免费一区| 亚洲欧洲成人精品av97| 欧美日韩精品系列| 丰满岳乱妇一区二区三区| 亚洲影院理伦片| 国产人成一区二区三区影院| 91福利视频网站| 国产原创一区二区| 亚洲国产日韩一级| 国产人妖乱国产精品人妖| 欧美一区二区三区啪啪| 国产精品18久久久久久久网站| 日韩理论在线观看| 日韩女优av电影| 99精品国产视频| 韩国视频一区二区| 亚洲小说欧美激情另类| 国产欧美一区二区精品秋霞影院 | 专区另类欧美日韩| 日韩精品一区二区三区在线播放| 91在线观看视频| 精品一区二区久久| 午夜日韩在线电影| 国产精品不卡视频| 精品91自产拍在线观看一区| 欧美日韩一区在线| www.久久精品| 国产精品一区二区男女羞羞无遮挡 | 中文一区一区三区高中清不卡|