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 / October 2006

Tip: Looking for answers? Try searching our database.

I need to upload an image to a folder in a remote server

Thread view: 
Diego - 13 Oct 2006 13:49 GMT
Hi every body,

i have to send an immage to a remote server, but  when i do run, i
didi't have console error or unsuccesful writing, but the image dosen't
appare in the folder....

tha file has this adress..

static String dest_source_folder =
"\\\\elmsrv-ese02\\ELMTEST-REPOSITORY\\ELM2\\WebSrv\\www\\app\\webroot\\img\\";

String dest = new String(dest_source_folder + "mio.jpg");

and  i try to send with..

ImageIO.write(dest, "JPG", new File(destFile);

the run give me an error:

Exception in thread "main" java.net.MalformedURLException: no protocol:
\\elmsrv-ese02\ELMTEST-REPOSITORY\ELM2\WebSrv\www\app\webroot\img\mio.jpg

what i have ti do to send this immage to the correct adress? (i sure
need to insert user ad pass word)

thk..
Brandon McCombs - 14 Oct 2006 00:51 GMT
> Hi every body,
>
[quoted text clipped - 22 lines]
>
> thk..

Well it seems that Java doesn't know how to use UNC path names and
therefore it can't write the file. You may need to open a socket and
send it "manually" unless you can use some other protocol such as ftp
that java understands. If you open a socket you'll need to write another
program that runs on the server that can receive your request from the
client.


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.