Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to email the output of a jsp page

Status
Not open for further replies.

ibenian

Programmer
Feb 24, 2004
3
TR
The second method is to implement a custom HttpServletResponse implementation and use it in getRequestDispatcher(...).forward(requrest, customResponse). Then you get the contents from your custom implementation! I tested it on a tomcat server running on a windows system and it worked ok. But the Iplanet server just rejected the custom implementation of HttpServletResponse! The error message is: servlet.NSRequestDispatcher.msg_invalidResClass.

Any ideas, or a working code would be highly appreciated!
 
Sorry, the full did not appear! It must be as follows:


Hi Everyone,
I want to capture the rendered html output of a jsp page and send it via email. I found two methods to do it but each had problems. I know there are people who already do it but I just don't know how they overcame these problems!

The first method is to open a url connection and get the input stream from it and read the ouput. I tested it and it worked for external urls perfectly! If I try to connect to the a jsp page on the same server, it just hangs! I guess it waits for the current jsp page to complete and ends up with a dead lock! Is there a solution to this?

The second method is to implement a custom HttpServletResponse implementation and use it in getRequestDispatcher(...).forward. I tested it on a tomcat server running on a windows system and it worked ok. But the Iplanet server just rejected the custom implementation of HttpServletResponse! The error message is: servlet.NSRequestDispatcher.msg_invalidResClass.

Any ideas, or a working code would be highly appreciated!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top