先看异常:ognl.MethodFailedException: Method "setImage" failed for object com.ccr.actions.LoginUpload@6dcfde [java.lang.NoSuchMethodException: setImage([Ljava.lang.String;)]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:823)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964)
at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:75)
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:131)
at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:50)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
          ··············很多省略
java.lang.NoSuchMethodException: setImage([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:810)
at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:964)
at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:75)
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:131)
at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:50)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
     ··········
     ·····省略部分我的的表带代码是这个样子的:
 <form enctype="multipart/form-data.action" action="<%=request.getContextPath()%>/control/upload_action_ul.action" method="post">
        <input type="file" name="image" /> 
        <input type="submit" value="上传">
    </form>
配置文件如下:
<struts>
<!-- 设置请求路径 <constant name="struts.action.extension" value="action,," /> -->
<constant name="struts.devMode" value="true" />
<package name="loginregister" extends="struts-default"
namespace="/control">

<!-- 登陆 注册 action -->
<action name="upload_action_*" class="com.ccr.actions.LoginUpload" method="{1}">
  <result name="upload_result">/upload_success.jsp</result>
</action>
</package>
</struts>java类
package com.ccr.actions;
import java.io.File;
import java.io.IOException;import org.apache.commons.io.FileUtils;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionContext;public class LoginUpload {
private File image;
private String imageFileName;

public File getImage() {
return image;
}
public void setImage(File image) {
this.image = image;
}
public String getImageFileName() {
return imageFileName;
}
public void setImageFileName(String imageFileName) {
this.imageFileName = imageFileName;
} public String ul() throws IOException{

String realpath=ServletActionContext.getServletContext().getRealPath("/images");
System.out.println(realpath);
if(image!=null)
{
File savefile=new File(new File(realpath),imageFileName);
if(!savefile.getParentFile().exists())
  savefile.getParentFile().mkdirs();
FileUtils.copyFile(image, savefile);
ActionContext.getContext().put("message", "上传成功");
}
else{
ActionContext.getContext().put("message", "上传失败");
}
return "upload_result";
}
}
截止目前问题未能解决,望高人指点迷津,我每天均登陆本社区,且做程序,答案正确着马上给分
      
      谢谢O(∩_∩)O~