It's not a secret anymore!
The moose likes Java in General and the fly likes how do I upload files? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "how do I upload files?" Watch "how do I upload files?" New topic

how do I upload files?

Johan Andersson

Joined: Oct 07, 2003
Posts: 1
I need some advice on how to save data from my app online. I have made an application handling some stuff and I want my friends to be able to run the same application on the same "save file"
I've tried to save it in a sql database but I can only access that locally
What I want to do now is upload the "string" i want to save on the net from the application somehow. FTP? HTTP? I don't know which way and how, anyone who would like to give me some hints? Just to save the file as save.xml or something on my website url.
(The application is not for a website, it's a standalone app programmed in Borland JBuilder)
Thanks in Advance!
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
Your post is a little confusing, so let me see if I understand corectly by summarizing.
Quick summary:
You want to be able to use Java to put a file onto a website.
Long summary:
You have a standalone java application and you want it to be able to put a file onto a website.

Assuming this is what you want, there are a couple more questions you need to know the answer to. Is your website running servlets/JSPs? If it is, there are some JSP/servlet ways to help you do this. I'm going to assume it's not since you didn't say it was.
Do you have FTP access to your website? I assume you do since most websites have FTP access. If you do have FTP access, you can FTP a file to/from your site from Java with the Jakarta Commons/Net package: I have used it and it works great.
[ October 08, 2003: Message edited by: Brian Pipa ]

My Java Freeware:<br />MACCC - <a href="" target="_blank" rel="nofollow"></a><br />Nator - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: how do I upload files?
jQuery in Action, 3rd edition