原创 struts1源碼學習1

ActionServlet初始化方法init public class ActionServlet extends HttpServlet //servlet初始化 public void init() throws Servle

原创 幾種AOP編程

面向切面編程相信大家都熟悉這個詞彙了,廢話我就不說了。 1、java.lang.reflect.Proxy 用動態代理來生成一個接口對象,然後通過InvocationHandler來實現切面織入。 這個動態代理是利用ProxyGenera

原创 struts1源碼學習9,command鏈對request和response的處理

先看chain-config.xml <?xml version="1.0" ?> <catalog name="struts"> <define name="lookup" className="org.apache.common

原创 struts1源碼學習6(doPost和doGet)

ActionServlet中的doPost和doGet的代碼是一樣的,都是調用process 直接看process代碼 protected void process(HttpServletRequest request,

原创 struts1源碼學習2(initChain)

先上代碼 protected void initChain()         throws ServletException {         // Parse the configuration file specified by 

原创 struts1源碼學習7,action處理核心ComposableRequestProcessor

先做個鋪墊,先回憶一下ActionServlet.initChain的細節 public void addRuleInstances(Digester digester) { // Add rules for a c

原创 struts1源碼學習4

ActionServlet.init() public void init() throws ServletException { final String configPrefix = "config/";

原创 db2的rollup和cube函數

rollup的效果就是對group by後面的一個分組列名進行統計。 bankid爲第一列 SELECT CASE WHEN grouping (branchid) = 0 THEN branchi

原创 struts1源碼學習8,chainBase對request和response的處理

ComposableRequestProcessor的process方法中,最核心的部分實際上是chainBase這個對象來處理的。 在ActionServlet.init執行完之後,這個chainBase對象中包含三個command。當

原创 spring3 bean容器相關源碼學習----ApplicationContext接口

如果從ApplicationContext所繼承的接口來看,ApplicationContext具有如下描述 1、EnvironmentCapable 獲取環境參數的能力 2、ListableBeanFactory 可列舉的bean工廠

原创 struts源碼學習5

ActionServlet.init() 1、initModuleForwards 配置全局forwards protected void initModuleForwards(ModuleConfig config)

原创 struts1源碼學習3

  public void init() throws ServletException {         final String configPrefix = "config/";         final int configP

原创 servlet3.0新特性測試,文件上傳(1)

servlet代碼@MultipartConfig() @WebServlet(name = "test", urlPatterns = "*.do", initParams = { @WebInitParam(name = "", va

原创 Digester

Digester是apache的一個xml解析工具。最近研究struts1源碼時候才發現這東西挺好用的,可以很輕鬆的把XML轉化成java對象。上代碼public class Acptrule { private String id;