• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts file upload example code

 
dave sag
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been asked to implement simple photo upload and resizing in our struts 1.1b3 web application and I am having trouble finding any example code. Google gives me links the javadocs which is nice but not that useful. Could some kind soul post a few links to some decent, simple example code? TIA dave.
 
dave sag
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay time for me to answer my own question again, with thanks to Rajani Deshpande for pointing out the obvious that I should have looked in the example code that came with struts, notably in struts-upload.war
so now my issue is slightly different. i have my site accepting uploads okay but for some reason by default it puts the files in $TOMCAT_HOME/bin which is hardly where I would have expected it to end up.
how do i specify in a fairly general way where i expect the file to go? it needs to be general as I work on my own laptop, deploy to a staging server and then eventually deploy to a live server. i don't want to have to rebuild for each deployment, but expect the .war file to be transportable.
TIA - dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic