Solved

upload a file using http

Posted on 2004-03-31
6
524 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
changePi Challenge 15 77
topping1 challenge 7 53
ArrayIndexOutOfBoundException 9 39
Java Server Faces parameter pass? 6 24
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now