This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
lyo Yashnoo
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
 
Graham Thorpe
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic