当前页面: 开发资料首页 → J2EE 专题 → spring 和 struts整合的问题:
spring 和 struts整合的问题:
摘要: spring 和 struts整合的问题:
看了ibm网站上的文章,还是弄不懂"将动作管理委托给 Spring"该怎么弄?
我的例子,一个简单的jsp表单,输入username和password,
注册动作为Logon,相应的类为LogonForm ,LogonAction,
把控制转给spring后怎么在后台输出username和password?
在struts配置文件中增加:
className="org.springframework.web.struts.ContextLoaderPlugIn">
然后该怎么做?spring 中怎么调用struts中的bean?
http://www.blogjava.net/oksonic/archive/2005/11/06/18370.html
spring配置文件中怎么调用DynaValidatorForm的ActionForm?
message No action instance for path /Logon could be created
description The server encountered an internal error (No action instance for path /Logon could be created) that prevented it from fulfilling this request.
struts-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<form-beans >
<form-bean name="LogonForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="password" type="java.lang.String" />
<form-property name="username" type="java.lang.String" />
</form-bean>
</form-beans>