1.tomcat調用struts2的filter後,再forward到jsp的時候的代碼類似如下,
String jsp = "xxxx.jsp";
HttpServletRequest req = new StrutsRequestWrapper(request);
request.getRequestDispatcher(jsp).forward(req, response);
2.在jsp上使用${xxxx}約等於request.getAttribute("xxxx");
3.在jsp裏調用getAttribute方法時,實際是調用的StrutsRequestWrapper的getAttribute方法
4.而這個類的getAttribute方法
的實現會獲取當前的action對象然後調用其getXxxx()方法
5.這並不是el本身有的功能,而是struts2通過javaweb的request包裝機制實現了調用action的getXxxx()方法。