ITeye博客

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

cui09 · 2007-08-07 21:02 · J2EE系统更新档案 · Markdown

xml 代码

  1. xml version="1.0" encoding="UTF-8"?>
  2. >
  3. <struts-config>
  4. <data-sources />
  5. <form-beans>
  6. <form-bean name="userLoginForm"
  7. type="org.perfect.struts.form.UserLoginForm" />
  8. form-beans>
  9. <global-exceptions />
  10. <global-forwards />
  11. <action-mappings>
  12. <action
  13. input="/userLogin.jsp"
  14. path="/userLogin"
  15. scope="request"
  16. name="userLoginForm"
  17. type="org.springframework.web.struts.DelegatingActionProxy"
  18. >
  19. action>
  20. action-mappings>
  21. <message-resources
  22. parameter="org.perfect.struts.ApplicationResources" />
  23. <plug-in
  24. className="org.springframework.web.struts.ContextLoaderPlugIn">
  25. <set-property property="contextConfigLocation"
  26. value="/WEB-INF/applicationContext.xml" />
  27. plug-in>
  28. struts-config>

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. <bean id="user" class="org.perfect.struts.vo.User">bean>
  7. <bean name="/userLogin" class="org.perfect.struts.action.UserLoginAction" scope="singleton">
  8. <property name="user">
  9. <ref bean="user" />
  10. property>
  11. bean>
  12. beans>

<html:form action="/userLogin"> </html:form>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。