Uploading a file to the server

J

juhunu

This may be a repettive question. But I have searched the web a lot
before posting this here.

I could not find an easy way of doing this.

Here is my requirement.
I want to upload a gif,jpeg file from my system to the TOMCAT server,
In addition I would like to

1. Specify my desired name for the uploaded files into the server.
2. Specify the directory into which I want these files to be uploaded

Filering for gif,jpeg is also fine, if it is easy, but this is not a
must.
 
R

Roedy Green

Here is my requirement.
I want to upload a gif,jpeg file from my system to the TOMCAT server,
In addition I would like to

1. Specify my desired name for the uploaded files into the server.
2. Specify the directory into which I want these files to be uploaded

You do that with an FTP upload utility. Some of them have scripting.
I have not yet run across any I would find acceptable for fully
unattended use. On my to do list is writing one, probably use the
Apache library or Peter van der Linden's work.

See http://mindprod.com/jgloss/ftp.html

See http://mindprod.com/projects/smartftp.html
for what I consider a suitable tool for the task.

If by any miracle you have a budget for that task, I would love to
write it for a fee.
 
A

Andrew Thompson

I could not find an easy way of doing this.

Define 'easy'.
Here is my requirement.
I want to upload a gif,jpeg file from my system to the TOMCAT server,
In addition I would like to

1. Specify my desired name for the uploaded files into the server.
2. Specify the directory into which I want these files to be uploaded

Servlets that can list and link to files (and directories),
create directories and upload files should do the trick.

Allowing user uploads is a security head-ache, though.

You will probably wake up one morning to find that
your site was removed by the server admin. after serving
a gigabyte of child pornography that came from users
you have never heard of. Server admin. may inform you
that the local legal authorities are interested in having
a long chat, as well.
 
P

PeanutPete

Andrew said:
Define 'easy'.


Servlets that can list and link to files (and directories),
create directories and upload files should do the trick.

Allowing user uploads is a security head-ache, though.

You will probably wake up one morning to find that
your site was removed by the server admin. after serving
a gigabyte of child pornography that came from users
you have never heard of. Server admin. may inform you
that the local legal authorities are interested in having
a long chat, as well.
 
P

PeanutPete

Andrew said:
Define 'easy'.


Servlets that can list and link to files (and directories),
create directories and upload files should do the trick.

Allowing user uploads is a security head-ache, though.

You will probably wake up one morning to find that
your site was removed by the server admin. after serving
a gigabyte of child pornography that came from users
you have never heard of. Server admin. may inform you
that the local legal authorities are interested in having
a long chat, as well.

You should have a look at the commons file upload project. It only
takes a few lines of code to let you upload a file.
http://jakarta.apache.org/commons/fileupload/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top