Article View: borland.public.jbuilder.java.language
Article #17679write to file HTTP server using URL?
From: Michael Appelmans
Date: Fri, 16 Oct 1998 00:00
Date: Fri, 16 Oct 1998 00:00
29 lines
1398 bytes
1398 bytes
I'm trying to write to a new file on the server with URL classes. The
code runs fine but no file shows up on the server. Anonymous user has
write authority to the server directory.
Server is NT4.0 SP3 running IIS. Note, I can read files from the
server.
try{
myURL = new URL("http","rbserver.agi.com","/trackx/test.txt");
URLConnection con = myURL.openConnection();
con.setDoOutput(true);
con.setRequestProperty("Content-type","text/html");
DataOutputStream dos = new
DataOutputStream(con.getOutputStream());
dos.writeBytes("NAME=ELVIS");
dos.flush();
dos.close();
}catch (Exception exc){
exc.printStackTrace();
}
Any ideas?
Thanks much.
--
Michael Appelmans
Agility, Inc.
*SpamBam - remove 123 to mail*
mappelmans@123agility-inc.com
Technical Details
Message-ID:
<708f3a$t604@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,585416bdb3a7e188,start X-Google-Attributes: gidf74b3,public From: "Michael Appelmans" <mappel@123ibm.net> Subject: write to file HTTP server using URL? Date: 1998/10/16 Message-ID: <708f3a$t604@forums.borland.com> X-Deja-AN: 401937709 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language