• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Uploading

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am in the middle of a tutorial on Struts II. Although I have gone all over trying to get this program up and running I am still having the same exact problem and would have to believe that it is common. The error is that the it is not setting the File object in my sub-class of ActionSupport. my server console almost always says

INFO: Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir

My Struts XML says this:



My Java Source code



I just threw this together very quickly. In previous attempts i followed the fileUpload's naming conventions far more strictly and still had the same result. So even though many of you may mention this it is most likely not the problem.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh yeah I forgot to mention that the File object is always null and does not exist.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know little about Struts, but my first check would be that "javax.servlet.context.tempdir" points to a directory that can be read and written by whatever user account the servlet container runs under, and that no security manager interferes with that.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Close ... turned out the problem was you have to nest the interceptor-ref's a certain way. But my program does run now. And yes I created an images directory and download to there and it is better.


Thanks
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am getting the same issue Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir. Would you please el;aborate how you resolved this issue.
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic