Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Sockets and Internet Protocols and the fly likes FTP and Multiple File Uploading Java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "FTP and Multiple File Uploading Java" Watch "FTP and Multiple File Uploading Java" New topic
Author

FTP and Multiple File Uploading Java

Myat Thu
Greenhorn

Joined: Dec 10, 2008
Posts: 7
Hi all,

I am new to Java FTP Field.
I want to create Multiple file uploading program
using java ftp service and J2EE.
Therefore, Please guide me
which links is suitable to see and learn,
which e book is should read,
which web link is good reference and so on.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35439
    
    9
Welcome to JavaRanch.

http://commons.apache.org/net/ is a good FTP client library written in Java. The javadocs of the org.apache.commons.net.ftp.FTPClient class contain an example of how to write a full client.


Android appsImageJ pluginsJava web charts
Myat Thu
Greenhorn

Joined: Dec 10, 2008
Posts: 7
Thank you for your reply,

I see http://commons.apache.org/net/ which you tell.
It is good link.
But, now what my problem is i want to create Tomcat FTP Server.
I have tomcat ftpserver-1.0.0-M3.zip file.
I check documentation which is under this folder.
But i did not find ftpd_ui.bat file. (I am using window)
So how can i configure apache ftp server using Swing UI?
I want to configure apace ftp server using Swing UI.
Please guide me again.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35439
    
    9
I'm not sure what you mean by "tomcat ftpserver" - Tomcat is a web server and servlet container, it has no provisions for acting as an FTP server.

The other server you mention -Apache FTPServer- has no GUI interface to my knowledge. I think very few of the freely available FTP servers have that. If GUI configuration is important to you, look at the some of the commercial products.
Myat Thu
Greenhorn

Joined: Dec 10, 2008
Posts: 7
Hello Ulf Dittmer,

I am using apache ftp server, not tomcat ftp server sorry about that.
Yes, it doesn't matter if it cannot run in GUI mode.
I want to know more command line for FTP Server.
Now what make me very difficult is i don't know how to operate ftp server.
Here is my error list and files which i used.
Please tell me what i need to do.

User name = admin
Password = admin

It is this username and password which i want to use in order to login fpt server.
And then
If i want to use mysql db, how should i do.
I am using window xp sp2 and apache ftpserver-1.0.0-M3.
Please let me know what shoud i do.


C:\FTPServer\bin>service install ftpd C:\FTPServer\res\conf\ftpd-typical.xml
Installing the service 'ftpd' ...
Using FTPD_HOME: C:\FTPServer
Using JAVA_HOME: c:\Java\jdk1.6.0
Using JVM: c:\Java\jdk1.6.0\jre\bin\server\jvm.dll
start
start;C:\FTPServer\res\conf\ftpd-typical.xml
start;C:\FTPServer\res\conf\ftpd-typical.xml
The service 'ftpd' has been installed.

C:\FTPServer\bin>net start ftpd
The Apache FtpServer ftpd service is starting.
The Apache FtpServer ftpd service was started successfully.


C:\FTPServer\bin>ftp pc69
> ftp: connect :Unknown error number
ftp> ls
Not connected.
ftp>

Here is ftpd-typical.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by
applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.
-->
<server xmlns="http://mina.apache.org/ftpserver/spring/v1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
"
id="myServer">
<listeners>
<nio-listener name="default" port="2121">
<ssl>
<keystore file="./res/ftpserver.jks" password="password" />
</ssl>
</nio-listener>
</listeners>
<file-user-manager file="./res/conf/users.properties" />
</server>


Here is users.properties file.

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# Password is "admin"
ftpserver.user.admin.userpassword=21232F297A57A5A743894A0E4A801FC3
ftpserver.user.admin.homedirectory=./res/home
ftpserver.user.admin.enableflag=true
ftpserver.user.admin.writepermission=true
ftpserver.user.admin.maxloginnumber=0
ftpserver.user.admin.maxloginperip=0
ftpserver.user.admin.idletime=0
ftpserver.user.admin.uploadrate=0
ftpserver.user.admin.downloadrate=0

ftpserver.user.anonymous.userpassword=
ftpserver.user.anonymous.homedirectory=./res/home
ftpserver.user.anonymous.enableflag=true
ftpserver.user.anonymous.writepermission=false
ftpserver.user.anonymous.maxloginnumber=20
ftpserver.user.anonymous.maxloginperip=2
ftpserver.user.anonymous.idletime=300
ftpserver.user.anonymous.uploadrate=4800
ftpserver.user.anonymous.downloadrate=4800
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: FTP and Multiple File Uploading Java
 
Similar Threads
FTP password
ftp??
How do I FTP files form my html form using "input type=file" through jsp/servlet
Downloading file from FTP using Java
FTP server