Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

File upload in Java, not JSP

Thread view: 
tiewknvc9 - 01 Aug 2006 15:08 GMT
Can anyone help point out what I should be researching in order to
upload a file from a client's machine (using a Java application
resident on their machine), to my web server?

thanks in advance
Michael Rauscher - 01 Aug 2006 16:34 GMT
tiewknvc9 schrieb:
> Can anyone help point out what I should be researching in order to
> upload a file from a client's machine (using a Java application
> resident on their machine), to my web server?

e.g. via FTP?

http://jakarta.apache.org/commons/net/

Bye
Michael
jagonzal@gmail.com - 01 Aug 2006 17:51 GMT
> Can anyone help point out what I should be researching in order to
> upload a file from a client's machine (using a Java application
> resident on their machine), to my web server?
>
> thanks in advance

If you have a web page in your server that will listen for a file
upload, then you could use commons-httpclient to POST the file.

If you need a from-scratch solution on both sides, then have a look at
using sockets.
tiewknvc9 - 01 Aug 2006 20:15 GMT
Thanks, these are the solutions I thought were my only options as
well...  Too bad it's a dissapointment.  Maybe FTp....

Oh well, I suppose that I will go the JSP route.

Thanks for the info!
Oliver Wong - 01 Aug 2006 21:05 GMT
> Thanks, these are the solutions I thought were my only options as
> well...  Too bad it's a dissapointment.  Maybe FTp....

   Maybe if you had said you thought of these solutions already and they
didn't satisfy you, and why they didn't satisfy you, someone would have
mentioned another solution.

   - Oliver
Luke Webber - 01 Aug 2006 23:37 GMT
> Thanks, these are the solutions I thought were my only options as
> well...  Too bad it's a dissapointment.  Maybe FTp....
>
> Oh well, I suppose that I will go the JSP route.
>
> Thanks for the info!

Why JSP? AFAIK, the only reason for using JSP is to provide an upload
link to click on. There are plenty of server-side file upload servlets
about (like the example in Jason Hunter's book), all you need is the
client-side logic, and that's not hard to do using HttpURLConnection.

I just did a quick Google and found this...

"naked chicks"

Hey! How'd that get there? I mean this..

http://www.jguru.com/faq/view.jsp?EID=62798

That's a bit limiting, because it assumes a text file, but that might be
OK for you. It would need some reworking for binary data. Probably need
to send it as a multipart attachment.

Cheers,
Luke
lethanhbinh87@gmail.com - 02 Aug 2006 14:41 GMT
> > Thanks, these are the solutions I thought were my only options as
> > well...  Too bad it's a dissapointment.  Maybe FTp....
[quoted text clipped - 22 lines]
> Cheers,
> Luke

If you  use URLConnection, You cannot upload files with large amount
(Eg: larger than 100MB or whatsoever ). So, If you want to use Socket,
You had better search for some infor about HTTP Protocol with Uploading
function.
http://sourceforge.net/project/showfiles.php?group_id=59144
that OS project may oblige


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.