Solved

upload a file using http

Posted on 2004-03-31
6
549 Views
Last Modified: 2012-06-27
I want to upload  a file as attachment to my IIS server using http.Due to certain constraints i can't use java mail or other technology like xml soap.I can only use java.net .Please help.
Thanks in advance

0
Comment
Question by:chakra-march-04
  • 2
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
Webstorm earned 63 total points
ID: 10724162
Hi chakra-march-04,

You can use an URL object to POST the file content :
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URL.html
http://java.sun.com/j2se/1.4.2/docs/api/java/net/URLConnection.html
or you can use the PUT http method.

0
 
LVL 13

Expert Comment

by:Webstorm
ID: 10724196
0
 
LVL 16

Assisted Solution

by:gnoon
gnoon earned 62 total points
ID: 10729383
Also you can use w3JMail component to do upload attachments.
http://www.dimac.net/Products/w3JMail/Version43/Examples/Attachments.htm
0
 
LVL 16

Expert Comment

by:gnoon
ID: 10729501
>Also you can use w3JMail component to do upload attachments.
Sorry, it's w3Upload component, not w3JMail.
http://www.dimac.net/Products/w3Upload/Reference/Upload.htm#example
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
servlet doXXX methods 3 62
Apps blocked by Java 9 88
hashmap order 17 36
Java Eclipse Loop 3 20
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
The viewer will learn how to implement Singleton Design Pattern in Java.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question