freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

通過(guò)代碼實(shí)例跟我學(xué)ssh三大框架相互整合的應(yīng)用技術(shù)第3部分——使用spring的actionsupport整合struts和spring的應(yīng)用實(shí)例-展示頁(yè)

2024-11-26 07:41本頁(yè)面
  

【正文】 能(參考 Spring API文檔說(shuō)明) Convenience class for Springaware Struts + Actions; Provides a reference to the current Spring application context, . for bean lookup or resource loading. Autodetects a ContextLoaderPlugIn context, falling back to the root WebApplicationContext. For typical usage, . accessing middle tier beans, use a root WebApplicationContext. For Struts DispatchActions or Lookup/MappingDispatchActions, use the analogous DispatchActionSupport or LookupDispatchActionSupport / MappingDispatchActionSupport class, respectively. ( 2)繼承關(guān)系 ( 3)實(shí)現(xiàn) 的方法和要求 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 2/21 頁(yè) 為 了 方 便 地 獲 得 Spring WebContext 環(huán)境,在 類中提供了一個(gè) getWebApplicationContext( protected final WebApplicationContext getWebApplicationContext()) 方法。我們所要做的只是從 Spring 的 ActionSupport 類(而不是 Struts Action 類)擴(kuò)展我們的 Struts 的 Action類。 ( 4)為什么我們的 Action 類要從 ActionSupport 類繼承 在常規(guī)的方式中,為了能夠在 Struts 的 Action 類中獲得各個(gè) 業(yè)務(wù)組件類的對(duì)象,一般是采用 WebApplicationContextUtils 類從 ServletContext 中獲得 WebApplicationContext 。 public class UserLoginAction extends ActionSupport // extends Action { public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest ServletRequest, HttpServletResponse ServletResponse) { //( 1)使用 getWebApplicationContext() 方法獲得一個(gè) ApplicationContext ApplicationContext applicationContext = getWebApplicationContext()。 //( 3) 再對(duì)業(yè)務(wù)組件類進(jìn)行訪問(wèn)以完成具體的功能實(shí)現(xiàn) } } ( 5)注意在 Spring 中針對(duì)我們不同的 Action 類提供了對(duì)應(yīng)不同的 ActionSupport Spring 包含了所有標(biāo)準(zhǔn) Struts Action 的子類 Spring 版本在類名末尾附加了 Support: 1) ActionSupport, 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 3/21 頁(yè) 2) DispatchActionSupport, 3) LookupDispatchActionSupport 4) MappingDispatchActionSupport 將 JBuilder 中所需要的 Spring 的 Jar 包文件庫(kù)加入到本 Project 中 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 4/21 頁(yè) 將 ContextLoaderPlugIn 作為 Struts 的 PlugIn 插件加入到 中 ( 1) 類 類,這是一個(gè) Struts 的 Plug,在 Struts啟動(dòng)時(shí)加載;利用它來(lái)加載 Spring 的組件類的 *.xml 配置文件,同時(shí)頁(yè)能夠?qū)崿F(xiàn)對(duì)于 Action也可以像管理一般的 Bean 一樣來(lái)來(lái)管理。 ( 1)在本 Web 應(yīng)用的 /WEBINF 的目錄下,創(chuàng)建 WebApplicationContext 的配置文件 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 5/21 頁(yè) ( 2) 內(nèi)的內(nèi)容如下 ?xml version= encoding=UTF8? !DOCTYPE beans PUBLIC //SPRING//DTD BEAN//EN 楊教授工作室 精心創(chuàng)作的優(yōu)秀程序員 職業(yè)提升必讀系列資料 楊教授工作室,版權(quán)所有,盜版必究 , 6/21 頁(yè) beans bean id=userLoginBusiness class=/ ! interceptors cannot reach Struts action because its not un
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1