File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

upload image usinng struts2

 
Rahul Bhalla
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Every one
I m new Struts 2 and i m trying to upload a image on server with the help of struts 2 but i was unable to do that i m pasting my code here ..
please tell where i m wrong

here is my action class

my beans class is

now my jsp from where i set my bean



my property file



struts.xml

when i deploy my application i got nullpointerexception and on line number 28 of the action class i found it prints null on server
please suggest me what can i do...
thanking you
 
Rahul Bhalla
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by mistake i put my problem on jsp forum sorry for that .if you able to help please post your reply on given link
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried this.

And refer this link. Struts2 FileUpload Setting FilePath
 
Rahul Bhalla
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mohana for the reply
I found problem as it need to change setter from setLogoName to set setLogoFileName
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic