在使用SSH做功能模块时,遇到报错:Invalid action class configuration that references an unknown class named [XX]
这种报错的原因有很多,不幸的是自己一下遇到两个,太粗心了。
1.action中方法的返回值在struts的action中没有给出处理结果
public String execute() throws Exception{ return "SUCCESS"; }
<action name="aaa" class="adminLogQueryAction" method="execute"> <result name="success" type="dispatcher"> <param name="location">/aaa/aaa.jsp</param> </result> </action>
2.在页面中定义了后台action中没有的属性/对象的属性
例如:在页面使用name向后台传参,但是后台没有定义这个属性。
例如:我在后台定义了mail对象,在页面本打算使用其属性mailid传参,结果直接写了mailid,此时应该是mail.mailid。
3.在页面中使用标签接收了后台传递过来的对象的值(包含若干属性)。
比如后台有一个类Person:
package com.dada.test; public class Person { private int id; private String name; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
在Action中有一个Person的实例person。
如果你在前台使用了如下方式来获取person值
<input type="text" name="person" value="<s:property value="person"/>"/>
那么等你再次把请求传递到同一个Action的时候就会报上面的错误,因为你的标签中记录的内容实际上是Action值栈中的person的引用,而当你再次把请求传递到后台的时候,这个值栈已经不存在了,所以它污染找到内容,所以就会报错。
4.搭建了一个SSH架构的项目,运行正常,做到某个查询页面的时候,发送请求到Action总是提示如
下错误:Invalid action class configuration that references an unknown class named
1).检查过Action配置正常,其他页面的返回是没问题的
2).不填写查询条件,直接返回所有数据的时候,运行正常
原因:数据类型不对,表单提交字符串,action中用整型变量接收,也会报此错误。
相关推荐
config.sub Invalid configuration `xxx': machine/OS `XXX' not recognized问题解决
NULL 博文链接:https://yangyangmyself.iteye.com/blog/2375213
列举了SVN在使用过程中经常遇到的错误及解决方法。
公司几百人用一个SVN库,一个权限文件Authz 整理下来很不容易!
Error:scalac: missing or invalid dependency detected while loading class file 'Tensor.class'. Could not access term mllib in package org.apache.spark, because it (or its dependencies) are missing. ...
This is not an invalid description.
Invalid
oracle error invalid rowid
新增了一个glibc-2.12-1.149.el6_6.5.i686.rpm包,其他的和之前的更新包相同,部分系统没有安装过这个包,直接批量更新可能回报错,说少个包。特此补上
支持反编译class文件,jar,zip等,窗口版本, windows下可直接运行。
解析主机为: 112.125.43.138 已连接. 正等待响应. 220 Microsoft FTP Service USER 123000 331 Password required for 123. ...500 Invalid PORT Command. PASV 227 Entering Passive Mode (10,247,80,183,117,51).
For example, if your header file uses the File class in ways that do not require access to the declaration of the File class, your header file can just forward declare class File; instead of having ...
打开vs提示invalid handle 解决方法
该资料主要介绍Intel® MAX® 10 FPGA Configuration User Guide相关内容
invalid
Delphi 10.3 ,程序运行到DataModule2.ClientDataSet1.ApplyUpdates(0);语句时,提示“Invalid parameter”错误
A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both. Filters perform filtering in the ...
Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType' is not writable or has an invalid setter method. Does the parameter type ...
invalid multibyte character sequence 870告警1