• Post Reply Bookmark Topic Watch Topic
  • New Topic

print and email functionality on my jsp page

 
thomas davis
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I just want to add two functionalities on my jsp page like print and email functionality.
I need to have two buttons on the top of page and when user clicks on the button for print, user should get a user-friendly page, which should contain only the contents (not the other things links, advertisements on the page). And regarding e- mail feature, when user clicks on email button, it has to navigate him to default email server on his machine.(like option :javaworld :user wants to send the content to his friend)
I hope you understand my requirements, if you have any questions, please feel to ask me..
You can find these type of functionalities in javaworld web site, I just want to know how does it work and how do I code it? If somebody has ready-made code with you, please send it very fast..

Thanks,
Thomas

[ October 15, 2003: Message edited by: Bear Bibeault ]
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1o) I'm not sure but I think you've got to create your own "printer friendly" pages (without links, images, etc).
2o) I don't like the functionality you want for your email. What if the user is using linux? what if the user does not have an email server?
what you want is the ability to send emails from your jsp's, using an SMTP server, in a platform independent way, and without any server use from the client side. have a look at the javamail api, and the mailer tag lib.
good luck
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For #2, you can use mailto:soAndSo@url.com in an href. That will open up a mail client that can connect to the e-mail provider.
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeanne Boyarsky:
For #2, you can use mailto:soAndSo@url.com in an href. That will open up a mail client that can connect to the e-mail provider.

very easy approach, but it's much better to provide an email functionality without opening any client site application. That's what javamail is for.
my $0.02
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andres,
I was under the impression that Thomas wanted to launch the e-mail client locally and let the user have control over what is sent. If it is ok for the program to have control, I agree JavaMail is better.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!