|
|
|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

07-09-2008, 07:56 AM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 4
|
|
|
code to upload a file in java
HI friends
I want to know how to upload a file in java.
After submitting the selected file should be copied in a folder created by us only.
I mean first we need to select a file using browse,then after submitting the selected file should be placed in a folder ,this folder should be created by us only using mkdir();
Can any one send me the code to upload a file.
Thanks in advance
|
|

07-09-2008, 08:35 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
|
radhiks, did you search the Google. I hope you can find an example very easily. Have a try and see.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

07-09-2008, 05:19 PM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
|
|
|
If you're talking about uploading a file from a client's PC to a server, you'll need two pieces of code. One to run on the client's PC and one to run on the server. Sort of what FTP can do.
There are several free FTP programs you could use.
|
|

07-09-2008, 07:11 PM
|
 |
Senior Member
|
|
Join Date: May 2008
Posts: 299
|
|
|
No norm, What radhika wanted is to copy a file from 1 folder to another created by user in the same computer.
As i remember we have a similar kind of post already with solutions too...
She just has to do a search in different search engines with different keywords.
__________________
To finish sooner, take your own time....
Nivedithaaaa
|
|

07-10-2008, 06:36 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
Originally Posted by Niveditha
What radhika wanted is to copy a file from 1 folder to another created by user in the same computer.
If so, simply use the file channels to copy files within a same PC in safer way. It's not much difficult at all.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

07-10-2008, 06:33 PM
|
 |
Senior Member
|
|
Join Date: May 2008
Posts: 299
|
|
|
Eranga i meant to say copying files from one dir to other using java.
__________________
To finish sooner, take your own time....
Nivedithaaaa
|
|

07-11-2008, 09:04 AM
|
 |
Moderator
|
|
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
|
|
Originally Posted by Niveditha
Eranga i meant to say copying files from one dir to other using java.
Yes, Niveditha it's true. I got what you say. What I'm say is, easiest way to do it using Java is use of File Channel.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Has someone helped you? Then you can To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. their helpful post.
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
All times are GMT +3. The time now is 02:21 AM.
|
|
VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org