This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Can anyone please try to run the following code and see if it works? There's a FileUpload.html, calling a FileUpload.jsp, calling the FileUpload.java file and all of them do one simple thing: upload a file from the file system and write it to a location you specify. This is simple stuff and it works on my windows development machine but for some reason this code - or rather an identical one inside a larger application - fails on the client's deployment server (which is a unix machine.) It seems to read only two thirds of the image to the dataBytes array and then stops, and later in the code throws an IndexOutOfBounds exception. It writes the uploaded file to the correct path and with the correct name but with 0 bytes. This is baffling to me and I would really appreciate some help.
One possible reason that I can think of: the directory it needs to write to on the client's server is virtual, and running on a separate file server. Could this be the problem?
I apologize for posting this question a second time but I got no replies the first one and now I'm including all the relevant code. To run it you'll need to change the serverPath in the jsp file to a path on your machine.