commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hookom, Jacob" <>
Subject Commons Net : FTPClient from Tomcat
Date Wed, 19 Oct 2005 21:13:12 GMT
I'm attempting to 'proxy' a http request over to a FTP server.  I'm able to
run the small block of code in sending rudimentary files just fine, get all
the ACKs back okay, but as soon as I cut and paste that same block into a
servlet for deploying to tomcat, the FTP transfer requests just hang.


is = new ByteArrayInputStream("<test>this is a test</test>".getBytes());

FTPClient ftp = new FTPClient();

ftp.connect("xxxx", 5000);



ftp.storeUniqueFile("xcbl-po", is);


ftp.disconnect() <ftp://ftp.disconnect()/> ;


Now, running this code from eclipse on my workstation transfers that test
just fine and I get back the correct acknowledgement, telling me what file
it created on the server.


If I take that very same block of code and try to execute it from a servlet,
it hangs on:


ftp.storeUniqueFile( <ftp://ftp.storeuniquefile("xcbl-po/> "xcbl-po", is);


Does anyone have any suggestions as to what I'm possibly missing here with
the code suddenly not working on Tomcat?  I was wondering if it's a
threading/socket issue while being deployed in tomcat.




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message