• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do i add a link for download?

 
Ravi Seth
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to download a file using <a href="link"> </a> format.. however its saying file not found, even though the link is correct. I am using java jsp for downloading the file. Please help
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch Ravi. :) Please show us what you have written so far in your JSP. Use code tags to paste code.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are getting a 404 then the link is not correct. Please show us the code that is showing the problem, and describe where the file being downloaded is stored within your web application,
 
Ravi Seth
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If you are getting a 404 then the link is not correct. Please show us the code that is showing the problem, and describe where the file being downloaded is stored within your web application,



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I asked for the code that's showing the problem; not the whole page. That's way too much code to wade through to find one issue. And scriptlets in a JSP! :shock:
 
Paul Clapham
Sheriff
Posts: 20983
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the code isn't very useful either, because we can't tell what the link is that it's generating.

You, on the other hand, can tell that by viewing the generated HTML in the browser. Or by hovering the cursor over the link you have a question about to see what URL it's actually going to connect to. So I suggest that you do so. Find out what the URL is and compare to what you expected it to be. Post details about that if you have a further question.
 
Paul Clapham
Sheriff
Posts: 20983
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way I don't see any <a href=anything> in your code either.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic