`
cui09
  • 浏览: 113523 次
  • 性别: Icon_minigender_1
  • 来自: 吉林
最近访客 更多访客>>
社区版块
存档分类
最新评论

J2EE 0.1—spring整合struts方法及纠错(原创)

阅读更多
xml 代码
  1. <!---->xml version="1.0" encoding="UTF-8"?>  
  2. <!---->>  
  3.   
  4. <struts-config>  
  5.     <data-sources />  
  6.     <form-beans>  
  7.         <form-bean name="userLoginForm"  
  8.             type="org.perfect.struts.form.UserLoginForm" />  
  9.   
  10.     form-beans>  
  11.   
  12.     <global-exceptions />  
  13.     <global-forwards />  
  14.     <action-mappings>  
  15.   
  16.   
  17.         <action    
  18.             input="/userLogin.jsp"  
  19.             path="/userLogin"  
  20.             scope="request"  
  21.             name="userLoginForm"  
  22.             type="org.springframework.web.struts.DelegatingActionProxy"  
  23.                
  24.             >  
  25.         action>  
  26.     action-mappings>  
  27.   
  28.   
  29.     <message-resources  
  30.         parameter="org.perfect.struts.ApplicationResources" />  
  31.     <plug-in  
  32.         className="org.springframework.web.struts.ContextLoaderPlugIn">  
  33.         <set-property property="contextConfigLocation"  
  34.             value="/WEB-INF/applicationContext.xml" />  
  35.     plug-in>  
  36.        
  37.        
  38. struts-config>  
  39.   
xml 代码
  1. <!---->xml version="1.0" encoding="UTF-8"?>  
  2. <beans  
  3.     xmlns="http://www.springframework.org/schema/beans"  
  4.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  5.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">  
  6.   
  7.     <bean id="user" class="org.perfect.struts.vo.User">bean>  
  8.        
  9.      <bean name="/userLogin" class="org.perfect.struts.action.UserLoginAction" scope="singleton">  
  10.           <property name="user">  
  11.                <ref bean="user" />  
  12.            property>  
  13.      bean>  
  14.   
  15. beans>  
<html:form action="/userLogin"> </html:form>
  • J2EE.rar (1003.4 KB)
  • 描述: 这个小程序还包括了一个解决中文问题的filter.和一个log4j日志工具
  • 下载次数: 3
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics