jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes struts file upload example code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts file upload example code" Watch "struts file upload example code" New topic

struts file upload example code

dave sag
Ranch Hand

Joined: Feb 17, 2003
Posts: 47
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.

JSF / Jini / Javaspaces / JDO - all rock in my opinion.
dave sag
Ranch Hand

Joined: Feb 17, 2003
Posts: 47
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: struts file upload example code
Similar Threads
Struts2 issue
Struts Help
How to store the PDF file in the server side?
Problem in inserting image in Struts 1