Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





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.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2008, 07:56 AM
Member
 
Join Date: Apr 2008
Posts: 4
radhika123 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-09-2008, 08:35 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 05:19 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-09-2008, 07:11 PM
Niveditha's Avatar
Senior Member
 
Join Date: May 2008
Posts: 299
Niveditha is on a distinguished road
Send a message via Skype™ to Niveditha
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
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-10-2008, 06:36 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by Niveditha View Post
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.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-10-2008, 06:33 PM
Niveditha's Avatar
Senior Member
 
Join Date: May 2008
Posts: 299
Niveditha is on a distinguished road
Send a message via Skype™ to Niveditha
Eranga i meant to say copying files from one dir to other using java.
__________________
To finish sooner, take your own time....
Nivedithaaaa
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-11-2008, 09:04 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 4,609
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by Niveditha View Post
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to upload a file? tommy JavaServer Pages (JSP) and JSTL 4 06-30-2008 04:50 PM
file upload sundarjothi JavaServer Pages (JSP) and JSTL 1 06-27-2008 01:52 PM
file upload in java muralikrishna New To Java 6 06-25-2008 10:24 AM
JFileUpload 2.0 released - Java file upload applet jfileupload Java Announcements 0 03-09-2008 04:04 PM
File Upload ShoeNinja JavaServer Pages (JSP) and JSTL 0 11-10-2007 12:09 AM


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