In my project,in the production some how we are getting NullPointerException while uploading a file. To upload a file we are using <html:file property="">
struts tag and we are using FormFile as the property of the form. We are trying to simulate this issue in the local by using Chrome,internet explorer,safari,Opera and mozila. we are unable to simulate, but in production we are getting NullPointerException while getting the form property like below
public class MyForm
{
private FormFile myFile;
setter & getter
}
In Action we are saying
myForm.getMyFile().getFileName();
Here we are getting NullPointerException.
if we don't upload any file, in action for the "myForm.getMyFile()" its giving empty. But some how in some cases we are getting for the same(myForm.getMyFile()) null. we are thinking that some browsers are not supporting file upload. Can you help me. Its urgent Please