How to get the html output of a local JSP page from my Java code, or use a JSP as an HTML templates.

D

DigitalUncle

How do I invoke a JSP page and get its output (html) within my servlet
code (I don't want to write this to the HTTP Response, I need to use
it in my code).

I want to use JSPs as HTML templates for emails. I have a servlet that
will send emails. This servlet needs to invoke a JSP page passing some
parameters by means of GET method. It will then get the output of the
JSP an send it via email.

The servlet and the JSP are on the same server!!! How can I invoke the
JSP locally without using URLConnection. Assume I have no idea what
the server name is, and if there is SSL or not.

Please help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top