• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

print and email functionality on my jsp page

 
Ranch Hand
Posts: 207
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For #2, you can use mailto:[email protected] 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
For #2, you can use mailto:[email protected] 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
Posts: 42165
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic