A
Andy Fish
Hi,
From my servlet I would like to be able to invoke a JSP (as part of the same
session), but rather than returning the output to the user I would like to
capture it as a stream or string or something.
from the servlet spec, it seems that the best way would be to use
RequestDispatcher to invoke the JSP, but then I would have to implement
ServletResponse myself to catch the output, which all seems rather onerous.
What I am actually trying to achive is an email template system, and JSP
just seemed like a very neat way to do it. However, any alternative
suggestions would be welcomed - at the moment my requirement is only for
simple variable substitution into plain text emails.
Andy
From my servlet I would like to be able to invoke a JSP (as part of the same
session), but rather than returning the output to the user I would like to
capture it as a stream or string or something.
from the servlet spec, it seems that the best way would be to use
RequestDispatcher to invoke the JSP, but then I would have to implement
ServletResponse myself to catch the output, which all seems rather onerous.
What I am actually trying to achive is an email template system, and JSP
just seemed like a very neat way to do it. However, any alternative
suggestions would be welcomed - at the moment my requirement is only for
simple variable substitution into plain text emails.
Andy