• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add a File Hyperlink to jsp?user can download it?  RSS feed

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends:
I am writing a mail systems.I can receive email attachment using javamail API. But I don't know how to add a hyperlink to the attachment so when user click the hyperlink the file will be download to disc.
I means that I want to add a hyperlink to the attachment,the hyperlink will get the file's path in mail server.Because the mail's attachment are stored in mail server so I don't know how to get it in my servlet.
what I can do is get a inputstream using messagePart.getInputStream();. I only can get a inputstream in servlet.How to change the inputstream to a File when user click it and download it?
Help!
Thks
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Once message stored at Imail Server then u can search any hyperlinks there or not ..If there means u can write code and separate the hyperlinks and gifs.
 
You have to be odd to be #1 - Seuss. An odd little ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!