原创 檢測指定URL是否有效連接的JAVA代碼

try{ URL url = new URL(url_s); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); /** * public int

原创 RPC(遠程過程調用協議)

  遠程過程調用(RPC)是一個協議,程序可以使用這個協議請求網絡中另一臺計算機上某程序的服務而不需知道網絡細節。(過程調用有時也稱作函數調用,或子例

原创 設計模式空間圖

設計模式

原创 Java Exception 繼承關係圖

[img]/upload/attachment/42963/5ca6873d-8bac-3f18-a2ec-b967a224ee56.gif" alt

原创 Struts2讀書筆記(一) 導讀

Here are some of the features that may lead you to consider struts2 : 1, Action based framework 2, Mature with a vibran

原创 Log4j 總結(三) log4j 之 Logger

Loggers are named entities. Logger names are case-sensitive and they follow the hierarchical naming rule: Named Hierar

原创 Log4j 總結(二) log4j主要的三個組件

Log4j has three main components: loggers , appenders and layouts . Log4j中有三個主要的組件,它們分別是 Logger、Appender和Layout。   1,L

原创 Log4j 總結(六) log4j 之 WriterAppender

public class WriterAppender extends AppenderSkeleton WriterAppender() This default constructor does nothing.

原创 Jdbc demo

String url = "jdbc:mysql://127.0.0.1:3306/mysql"; String username = "root"; String password = "123456"; try { Class.fo

原创 Log4j 總結(五) log4j 之 配置文件

前面幾個都是概念,現在是實戰 Log4j支持兩種格式的配置文件:XML格式和Java的property格式. log4j.properties 置於classes下   # root log4j.rootLogger=debug, std

原创 Html元素內回車的處理

做事從小事入手,從細節入手.   Html元素<textarea></textarea>文本域標籤,裏面可以輸入文字,當然回車換行也是允許的。 當我們往數據庫存儲的時候,回車換行被轉換爲"\r\n" 如果不注意,可能會出現這樣的情況,數據

原创 Servlet 的生命週期 (摘自JSP2.0技術手冊)

(1) 產生 Servlet,加載到Servlet Engine中,然後調用 init( )這個方法來進行初始化工作。 (2) 以多線程的方式處理來自Client 的請求。 (3) 調用 destroy( )來銷燬Servlet,進行垃

原创 Log4j 總結(一) log4j特色

One of the distinctive features of log4j is the notion of inheritance in loggers. Using a logger hierarchy it is possib

原创 Tomcat 各版本支持的Servlet規範

Servlet/JSP Spec Apache Tomcat version 2.5/2.1 6.0.18 2.4/2.0 5.5.27 2.3/1.2 4.1.37 2.2/1.1 3.3.2

原创 Jsp的執行過程

JSP 的執行過程 (1) 客戶端發出Request (請求); (2) JSP Container 將JSP轉譯成Servlet的源代碼; (3) 將產生的Servlet 的源代碼經過編譯後,並加載到內存執行; (4) 把結果Re