C
Craig Coffey
-- WARNING, INCOMING LONG-WINDED MESSAGE --
Ok, so I went through all this trouble to actually create an HTTP
File Upload status bar using the MultipartRequest stuff from Jason
Hunter. It shows the filename, size, bytes transferred, and a neat
little status bar with percentage done. It works, and looks purdy.
So, then I put this up on our external server, and try it out,
and... It transfers the file, but there is no filename, size or bytes,
and the status bar stays at 0% until the file is done (or almost done)
and then jumps to 100% (or close to it) right at the end of the file
transfer.
The status bar works fine if I remotely control the machine, and
perform a local file transfer... Odd.
Let me explain, quickly, what I have done. Basically, when you say
you want to transfer a file, you get a popup window. This window has
2 frames; The top frame has the html form with the file field, and
the bottom from (which is size 0, and thus invisible) is the target of
that form. When the form is submitted, the file transfer is actually
happening in the invisible frame, and the top frame loads a JSP which
displays the status of the file transfer. The actuall file transfer
java class (MultipartRequest) keeps track of the status, stuffs it
into a simple object, and tosses that object into the session scope.
This object is looked for by the status JSP (which reloads every 5
seconds). When it finds this object, it grabs it, and uses the info
in it to display all the neat stuff I spoke of.
So... As I said, this works fine and dandy, and believe it or not,
does not affect the speed of the tranfer (I tested it against FTP
ALOT). But it doesn't seem to work through the firewall of our
external site. My theory is that the firewall is reading the entire
header to make sure that it is well formed before it passes it onto
the server itself. Since the file is actually PART of the header
(right?) it is loaded onto the firewall first, and THEN sent to the
server. The transfer to the server (since it is local) is very fast,
and thus the start to finish of the file transfer from the status bars
point of view is also very fast.
And, that is my dilema. This is just a theory, and therefore I ask,
is this theory sound? Does this sound like a firewall problem? Or
does it sound like I need to revisit my Java code?
I realize that this whole situation walks a fine line between
internet security and java programming. And if my theory is correct,
that it is actually on the OTHER side of that line, and thus not
appropriate for this ng, but I had to start somewhere, so please be
gentle with me
-Craig Coffey
PS- My REAL email is ccoffey@[email protected] (without the N0SP@M),
but I was forced to use Google for the post, and couldn't use a fake
email. Thnaks Yahoo!
Ok, so I went through all this trouble to actually create an HTTP
File Upload status bar using the MultipartRequest stuff from Jason
Hunter. It shows the filename, size, bytes transferred, and a neat
little status bar with percentage done. It works, and looks purdy.
So, then I put this up on our external server, and try it out,
and... It transfers the file, but there is no filename, size or bytes,
and the status bar stays at 0% until the file is done (or almost done)
and then jumps to 100% (or close to it) right at the end of the file
transfer.
The status bar works fine if I remotely control the machine, and
perform a local file transfer... Odd.
Let me explain, quickly, what I have done. Basically, when you say
you want to transfer a file, you get a popup window. This window has
2 frames; The top frame has the html form with the file field, and
the bottom from (which is size 0, and thus invisible) is the target of
that form. When the form is submitted, the file transfer is actually
happening in the invisible frame, and the top frame loads a JSP which
displays the status of the file transfer. The actuall file transfer
java class (MultipartRequest) keeps track of the status, stuffs it
into a simple object, and tosses that object into the session scope.
This object is looked for by the status JSP (which reloads every 5
seconds). When it finds this object, it grabs it, and uses the info
in it to display all the neat stuff I spoke of.
So... As I said, this works fine and dandy, and believe it or not,
does not affect the speed of the tranfer (I tested it against FTP
ALOT). But it doesn't seem to work through the firewall of our
external site. My theory is that the firewall is reading the entire
header to make sure that it is well formed before it passes it onto
the server itself. Since the file is actually PART of the header
(right?) it is loaded onto the firewall first, and THEN sent to the
server. The transfer to the server (since it is local) is very fast,
and thus the start to finish of the file transfer from the status bars
point of view is also very fast.
And, that is my dilema. This is just a theory, and therefore I ask,
is this theory sound? Does this sound like a firewall problem? Or
does it sound like I need to revisit my Java code?
I realize that this whole situation walks a fine line between
internet security and java programming. And if my theory is correct,
that it is actually on the OTHER side of that line, and thus not
appropriate for this ng, but I had to start somewhere, so please be
gentle with me
-Craig Coffey
PS- My REAL email is ccoffey@[email protected] (without the N0SP@M),
but I was forced to use Google for the post, and couldn't use a fake
email. Thnaks Yahoo!