我已经配置了注释以将值作为文本返回。但它给了我错误:无法找到行动或结果。Struts 2 - 找不到动作或结果
控制台错误:
org.apache.struts2.dispatcher.Dispatcher - Could not find action or result
/part!finder.xhtml
No result defined for action action.PartAction and result success
译注:
@Action(value="part!finder", results = {
@Result(name="SUCCESS", type="stream", params = {"contentType", "text/html", "inputName", "inputStream"}),
@Result(name="success", type="stream", params = {"contentType", "text/html", "inputName", "inputStream"})
})
public String finder() {
try {
inputStream = new ByteArrayInputStream(finder1().getBytes());
}
catch(Exception e) { }
return SUCCESS;
}
}
你正在尝试执行的'action.PartAction'没有被定义在任何地方...... – Armaggedon
没有action.PartAction是类路径...就像com.aa.action.PartAction和PartAction是动作类名。 – user2444474