Solved

upload a file using http

Posted on 2004-03-31
6
562 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

729 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