Web-Inf->lib has following jars :-" name="description">

Hi I am also getting following error while trying to upload a file using struts file tag :
Invalid field value for field "upload".
My webContents->Web-Inf->lib has following jars :-
commons-collections-3.2.jar commons-fileupload-1.2.1.jar commons-io-1.3.jar commons-logging-1.1.jar freemarker-2.3.8.jar ognl-2.6.11.jar struts2-core-2.0.11.jar xwork-2.0.4.jar
upload.jsp -> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags"%>
struts.xml ->
<action name="uploadingFile" class="action.FileUpload">
<result name="success">/uploadSuccessful.jsp</result>
<result name="input">/upload.jsp</result>
</action>
</package>
package 'action' has FileUpload.java ->
package action;
import java.io.File; import java.io.IOException;
import org.apache.commons.io.FileUtils; import com.opensymphony.xwork2.ActionSupport;
public class FileUpload extends ActionSupport {
private static final long serialVersionUID = 1L;
private File upload;
private String uploadContentType;
private String uploadFileName;
public String execute() {
System.out.println("inside execute");
String fullFileName = "e:\\upload\\myFile.txt";
File theFile = new File(fullFileName);
try {
FileUtils.copyFile(upload, theFile);
return "success";
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return "input";
}
}
public File getUpload() {
return upload;
}
public void setUpload(File upload) {
this.upload = upload;
}
public String getUploadContentType() {
return uploadContentType;
}
public void setUploadContentType(String uploadContentType) {
this.uploadContentType = uploadContentType;
}
public String getUploadFileName() {
return uploadFileName;
}
public void setUploadFileName(String uploadFileName) {
this.uploadFileName = uploadFileName;
}
}
As i click submit .. i get Invalid field value for field "upload". on jsp page but not in console
Please guide I am stuck to this for long
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.