- FTP = use a FTP client API on the app server to request the file from a FTP daemon on the DB server, parse results as needed


OR

- SCP (SSH) = use scp in a script to copy the file from the DB server to the App server at a predetermined time, then use java.io.* to read the file on the App server

OR

- HTTP = use a HTTP client API on the app server to request the file from a HTTP daemon on the DB server, parse results as needed (note that this does not mean that you have to use IIS or Apache...anything that can "speak" HTTP 1.1 would do, such as Jef Poskanzer's thttpd available here: http://www.acme.com/software/thttpd/ running on a non-standard port such as 12345 or 32324 or whatever, it doesn't have to be (and shouldn't be) port 80) NOTE: I've used thttpd for a couple years and it rocks

OR

- NFS/samba = use NFS or samba to map a partition on the DB server as a native partition on the App server, then use java.io.* to read the file

There are probably even more alternatives than what I've listed. If you are looking for some sort of API or servlet method that can locate, find, and retrieve a file on a remote host without needing any external resources or configuration, I don't think you will find one. Such a beast would be blatantly insecure. At the very minimum, you'll need an HTTP or FTP daemon on the DB server, or the ability to use scp (Secure Copy) via SSH.

John

On Thu, 03 Apr 2003 15:44:31 +0000, Manu Kits <[EMAIL PROTECTED]> wrote:

Hi John,

Thanks for your email.

I want to write the code in Java on App Server to move the file from DB Server (both on different machines)

Thanks!


From: John Turner <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: Moving/Reading files from DB Server to App Server
Date: Thu, 03 Apr 2003 09:50:45 -0500


- FTP - SCP (SSH) - HTTP - NFS/samba

John

On Thu, 03 Apr 2003 14:43:00 +0000, Manu Kits <[EMAIL PROTECTED]> wrote:

Hello,

I have 2 different Servers - App Server and DB Server.

I have script.sql file on my DB Server and so how can I move this file to App Server using Servlets/JSP.... I know we have to use FileInputStream...but not sure it will solve this problem.

Any information on this is appreciated.

THANKS!

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to