正在加载图片...
用诸如 Spring的AOP拦截器之类的特性带来了可能 清单5中的 Action类与清单4中的相同。但是 struts- config有一些不同: 清单5. Spring整合的委托方法 <?xml version="1.0 encoding="Is0-8859-1 ? < DOCTYPE struts-config PUblIc //Apache Software Foundation//DTD Struts Configuration 11//EN http://jakarta.apacheorg/struts/dtds/struts-config11.dtd> Kstruts-config <form-beans> <form-bean e- searchFor type="org. apache. struts. validator. DynavalidatorForm"> <form-property name="isbn" type=" java. lang String /> </form-bean> /form-beans Kglobal-forwards type="org. apache struts action. ActionForward> <forward name= welcome path="/welcome. do/> Forward name="searchEntry path="/searchEntry do/> <forward name= searchSubmit path="/searchSubmit do/> /global-forwards> < action- mappings〉 Action path=/welcome" forward="/WEB-INF/pages/welcome. htm/> Action path=/searchEntry" forward="/ WEB-INF/pages/search. jsp"/> Action path="/searchSubmit type=org. springframework. web. struts. DelegatingActionProxy"(1) input="/searchEntry do validate="true Forward name="success" path="/WEB-INF/pages/detail. jsp/用诸如 Spring 的 AOP 拦截器之类的特性带来了可能。 清单 5 中的 Action 类与清单 4 中的相同。但是 struts-config 有一些不同: 清单 5. Spring 整合的委托方法 <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <struts-config> <form-beans> <form-bean name="searchForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="isbn" type="java.lang.String"/> </form-bean> </form-beans> <global-forwards type="org.apache.struts.action.ActionForward"> <forward name="welcome" path="/welcome.do"/> <forward name="searchEntry" path="/searchEntry.do"/> <forward name="searchSubmit" path="/searchSubmit.do"/> </global-forwards> <action-mappings> <action path="/welcome" forward="/WEB-INF/pages/welcome.htm"/> <action path="/searchEntry" forward="/WEB-INF/pages/search.jsp"/> <action path="/searchSubmit" type="org.springframework.web.struts.DelegatingActionProxy" (1) input="/searchEntry.do" validate="true" name="searchForm"> <forward name="success" path="/WEB-INF/pages/detail.jsp"/>
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有