A.setParameter()和getParamter() B.setAttribute()和getAttribute() C.addAttribute()和getAttribute() D.set()和get()
A.在Servlet實(shí)例化之后,Servlet容器會調(diào)用init()方法。 B.Servlet 通過init()方法可以實(shí)現(xiàn)一些初始化工作,如建立數(shù)據(jù)庫連接,獲取配置信息等 C.init()方法可以被多次調(diào)用
A.Strust2采用過濾器Dispatcher接貨客戶請求,確定適當(dāng)?shù)腁ction來對請求進(jìn)行邏輯處理。 B.Struts2中對應(yīng)Action中只能采用execute方法用來進(jìn)行信息(邏輯)處理。 C.Struts也能采用其他方法(如find()),只需在struts.xml配置Action時,指定method參數(shù)。 D.要使Struts2機(jī)制在web請求中生效,必須在Web.xml配置<filter>