• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

upload image usinng struts2

 
Greenhorn
Posts: 17
  • 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
  • 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
 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 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
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!