aspose file tools*
The moose likes Servlets and the fly likes Another file sending question... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Another file sending question... " Watch "Another file sending question... " New topic
Author

Another file sending question...

Brian Coates
Ranch Hand

Joined: Jul 03, 2001
Posts: 42
I'm trying to figure out a way to transmit a file from one webapp to another, each running on different servers. It also need to be done completely behind-the-scenes, unseen by the user. The goal is to make it look and act as if one user is exporting information from one app and importing it to another with just a click.
I was thinking about trying to include the file in the HTTP header? And then on the receiving end, have a jsp that can act as a "listener" and pull the file out of the header when it gets hit?
Is this kind of thing possible with HTTP? I've checked around here, on Sun, and on Google... and either there isn't anything on it, or I'm just not searching with the right keywords. Or if anyone has a better idea, I'd appreciate it.
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
Transmitting a file from one to another is what the FTP protocol is all about. Search for FTP support classes, which are either freely or commercially available.
Brian Coates
Ranch Hand

Joined: Jul 03, 2001
Posts: 42
Correct me if I'm wrong, but that would require one of them to be running an FTP server... to either download from, or upload to. Neither of which is a desireable scenario.

Also, it would be best if all of this could be done one the fly without having the file ever on either of the servers file system. It it were only one or two users using it, it wouldn't be a concern. But for scalability, I don't want either of the boxes have to create a file just to turn around and delete it... for every user.
Does this knock me out of the water?
[ February 03, 2004: Message edited by: Brian Coates ]
Brian Coates
Ranch Hand

Joined: Jul 03, 2001
Posts: 42
For anyone interested, the following looks very promising...
Jakarta Commons HttpClient
Jakarta Commons FileUpload
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another file sending question...