`
cui09
  • 浏览: 117347 次
  • 性别: 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
分享到:
评论

相关推荐

    J2EE课程设计任务书

    - **平台构建:** 配置Tomcat6.0为MyEclipse开发环境下的可用应用服务器,并导入Struts1.2、Spring2.0、Hibernate3.0等框架插件。 - **数据库设计:** 根据需求进行表设计,建立表与表之间的关系图,编写数据字典...

    最新java毕业设计题目大全资料.docx

    9. **Web 开发框架**:“J2EE”项目通常会用到Spring、Struts或Hibernate等,理解MVC框架的运行机制。 10. **安全与加密**:“基于Http协议的断点续传”可能需要处理数据的加密传输,了解HTTPS协议和SSL/TLS安全...

    JAVA毕业设计方案论文题目大全.pdf

    5. **Web应用开发**:如B2C电子商务系统、在线考试系统、网上售票系统等,这要求开发者熟悉Web开发框架,如Spring、Struts或Hibernate,以及MVC设计模式。 6. **移动应用与物联网**:例如掌上网络商店、手机游戏、...

    2022年关于软件公司实习报告汇总九篇.docx

    - 通过基于B/S的图书管理系统项目,实习生经历了从简单的JSP到运用三大框架(Struts、Spring、Hibernate)的进化,理解了分层架构的优势,增强了实际操作和问题解决能力。 8. **职业素养**: - 在毕业设计和项目...

Global site tag (gtag.js) - Google Analytics