Originally posted by Desai Sandeep:
- Filtering added in Servlet 2.3 specification
- Custom tag implementing the BodyTag interface
- URLConnection
The third solution is what probably you have mentioned.Does this mean using Serialization and writing it to a file using the ObjectOutputStream, and then reading it when required using the ObjectInputStream.
To start with your last remark, yes, that's what I suggested (as the javadoc points out, URL.getContent() is just shorthand for URL.openConnection().getContent()). But serialization -- you want to capture a JSP's HTML output, right? So it's just plain text. Object serialization doesn't enter the picture as far as I can see.
About the other two solutions, not quite sure. Filtering is quite new and your server may not support it, also it's not clear to me how it would help.
Tag libraries are well supported, but wouldn't that mean embedding your HTML e-mail as part of the JSP? I silently assumed that you wanted your e-mail to be a separate, easily updateable template. Taglibs would be more efficient though.
- Peter