Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
<a> is not downloading the file
Vassili Vladimir
Ranch Hand
Posts: 1585
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
I am doing the following:
<a href="<%=path%>resources/templates/txt/file.txt">download</a>
So instead of the file being downloaded, it is being viewed on the browser!
How can i force it download and not view?
Thanks,
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Ulf Dittmer
Rancher
Posts: 43081
77
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Configure your browser to save text files instead of displaying them; there's nothing the web app can do about that.
Vassili Vladimir
Ranch Hand
Posts: 1585
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How do I do that?
Can I download files using
jsf
actions in backing beans?
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
David Newton
Author
Posts: 12617
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You're asking how to use JSF and backing beans to download a file but you don't know how to configure a browser to handle a content type, or know how to send a file as an attachment?!
Vassili Vladimir
Ranch Hand
Posts: 1585
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No I don't that's why I'm asking! Are you willing to tell me
Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How do I aoid the download screen ??
Force a file download in HTML
validation in tomcat 4.1
Excel & MS Word files with IFrames
downloading zip file through javascript
More...