我用Flex3和Struts1写了一个Demo,具体配置路径:(escplise+flex3+tomcat5.5)
Flex3中提交的数据路径:
var service:HTTPService = new HTTPService();
service.url="/UserRegDemo/userRegAction.do";//提交路径
service.resultFormat = "e4x";//返回结果集
service.method = "post";//提交方法
service.addEventListener(ResultEvent.RESULT,QueryResult);
service.addEventListener(FaultEvent.FAULT,FaultHandle);
var dataParameters:URLVariables = new URLVariables();
//action中具体的处理方法
dataParameters.method = "addUser";
Struts-config.xml:
<action-mappings> <actionpath="/userRegAction"scope="request"parameter="method"type="com.huawei.bicp.userregdemo.action.UserRegAction"/>
</action-mappings>我确认路径木有问题!
但只要一提交就报:
No action instance for path /userRegAction could be created
java.lang.ClassNotFoundException: com.huawei.bicp.userregdemo.action.UserRegAction无语了!!!哪位高手帮我解决一下。
Flex3中提交的数据路径:
var service:HTTPService = new HTTPService();
service.url="/UserRegDemo/userRegAction.do";//提交路径
service.resultFormat = "e4x";//返回结果集
service.method = "post";//提交方法
service.addEventListener(ResultEvent.RESULT,QueryResult);
service.addEventListener(FaultEvent.FAULT,FaultHandle);
var dataParameters:URLVariables = new URLVariables();
//action中具体的处理方法
dataParameters.method = "addUser";
Struts-config.xml:
<action-mappings> <actionpath="/userRegAction"scope="request"parameter="method"type="com.huawei.bicp.userregdemo.action.UserRegAction"/>
</action-mappings>我确认路径木有问题!
但只要一提交就报:
No action instance for path /userRegAction could be created
java.lang.ClassNotFoundException: com.huawei.bicp.userregdemo.action.UserRegAction无语了!!!哪位高手帮我解决一下。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货