• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to email current opening jsp/html page.......  RSS feed

 
indika prasad kularathne
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai all..

I need to forward the current openning webpage (jsp/html) to the email address provided by the user.
As a example..
opening page - voucher.jsp,
this page have a button called [ email this page ]
when user click this button, the whole page(not a url) should be sent to the provided email address using emailWholePage.jsp or some thing like that.

thanks..

indika
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to need to use JavaMail to actually send the email.

And you'll also have to do something to write the response of the JSP page into a String to include in the email rather than have it write it into the current HTTP response...
 
indika prasad kularathne
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dear,

Actually now i am using java mail to send a mail.but real situation is how to write the response of the JSP page into a String.

Please tell me the way to do it.

thanks..
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a page on JGuru that describes several approaches to capturing the output of a servlet or JSP.
 
indika prasad kularathne
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Nathan..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!