Ok what I did in that case is set a variable to hold the location of the base. The base is a property in my config file of where the files are being stored. I did it this way because I wanted to be able to change the location of where the files are uploaded to. A better option would be to use the property value and not store it in my object. If I don't wanted the user to be able to edit the location of the files I'd use the servlet context realpath to find the full path of the file. Or use a classloader. That's what I would normally do, but now I'm looking at using frameworks for that as well, so I'm not sure where I'll be in the future.
Sebastian Knoerzer wrote: >thanks for your help. > >if i try to generate a file with my path, i always get a file length of 0. > >i saw that you wrote >java.io.File file = new java.io.File(work.getFileURIString()); > >so my question is how you get the right path for the file (getfileuristring())? >in my case the path is /uploads/test.pdf but that wont work. > >thanks for your help > >sebastian > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- Justin Stanczak Stanczak Group 812-735-3600 "All that is necessary for the triumph of evil is that good men do nothing." Edmund Burke ..________...............__................. ./ _____/..____..._____/..|_..____...____.... /...\..____/.__.\./....\...__\/.._.\./._..\.... \....\_\..\..___/|...|..\..|.(..<_>.|.<_>..).... .\______../\___.._\__|../__|..\____/.\____/...... ........\/.....\/.....\/.......................... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
