正在加载图片...
else if ("page".equals(scope))( page Context. setAttribute(key, entry ) 將取得內容輸出 Jsp Writer out =bc. get Enclosing Writer; out.print(content); catch(IOException ioe) System. err println("Problems with writing.") else{∥若未過期則從指定範圍取岀網頁內容輸岀 try wRiter out= page Context. getOut(; out.print(entry. get Contento); catch(IOException ioe)( System. err printIn("Problems with writing.") return EVAL page. 類別用來幫助 CacheTag記錄網頁內容及判別網頁內容是否過期 class entry i String content ong long duration oublic Entry(String content, long duration)i this content= content;/記錄網頁內容 timestamp= System. currentTimeMilliso;〃記錄系統時間} else if ("page".equals(scope)) { pageContext.setAttribute(key, entry); } //將取得內容輸出 try { JspWriter out = bc.getEnclosingWriter(); out.print(content); } catch (IOException ioe) { System.err.println("Problems with writing..."); } } } else { //若未過期則從指定範圍取出網頁內容輸出 try { JspWriter out = pageContext.getOut(); out.print(entry.getContent()); } catch (IOException ioe) { System.err.println("Problems with writing..."); } } return EVAL_PAGE; } //此類別用來幫助 CacheTag 記錄網頁內容及判別網頁內容是否過期 class Entry { String content; long timestamp; long duration; public Entry(String content, long duration) { this.content = content; //記錄網頁內容 timestamp = System.currentTimeMillis(); //記錄系統時間
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有