hello,
I am using
struts 2.2.1 framework with jdk 1.6 and running in
tomcat 7. In my web application, I want to upload excel file and read the content of that file. I have searched many websites and even apache website as well but I could not solve my problem.
After uploading file, when I try to read the uploaded file, error occurs : java.lang.NullPointerException. I think the variable "upload" in
java file, should automatically initialized after file upload. isn't it?
I think my code is good, but its not working.
upload page: upload.jsp
struts.xml
ProcessUploadAction.java
Output:
File name:null
java.lang.NullPointerException
can anyone suggest me, what is the problem?
Thank you in advance.