Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Servlets
Upload and Download a file
Poornima Sharma
Ranch Hand
Posts: 114
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi friends,
Can we upload or download a file using
servlets
.
If yes how can we.
Poornima Sharma
SCJP 6.0
Bear Bibeault
Sheriff
Posts: 67756
173
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes, see the
JSP
FAQ for an entry on uploading. Downloading is as easy as including a link to the file on an HTML page.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Ulf Dittmer
Rancher
Posts: 43081
77
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If for some reason putting the file in a public directory (where an href link can find it) is not an option, you can use a simple servlet to stream it to the client. See
http://faq.javaranch.com/java/CodeBarnSimpleStream
for an example.
Deepti chhabra
Greenhorn
Posts: 1
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Can you please post the code, that allows you to download the file from the server.
Thanks
Deepti
Bear Bibeault
Sheriff
Posts: 67756
173
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
<a href="file.txt">Download me!</a>
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Beauty is in the eye of the tiny ad.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Access Sharepoint
HTTPS File Uploader
File Chooser
Upload and Download a file
File upload/download using UDP
More...