IntelliJ Java IDE
The moose likes JSP and the fly likes Including jsp output in a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

Including jsp output in a servlet

Adam Rose
Greenhorn

Joined: Jul 04, 2002
Posts: 5
Hi,

I was hoping to use a jsp to produce the body content of an email that I am sending from a servlet. From within a servlet, I would like to obtain an InputStream that supplies me with the output of the jps that produces the body content. Is there any way to do this? as far as I can see the ServletContext.getServlet() method has been deprecated and not replaced by anything - how can I communicate with another servlet? I don't want to forward or redirect to it - I actually want to use its output in my repsonse. This seems liek it would be a really easy thing to do, but it proving very elusive. I don't really want to generate a whole new request and use this response stream, because I need to be in the same session, and I don't really want the URL to be externally defined. Surely there is a way to get a jsp as an InputStream.... thanks in advance,
Adam
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Please do not cross post. Continue the conversation here.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
 
subject: Including jsp output in a servlet
 
Threads others viewed
JSP Tags
Including jsp output in a servlet
Passing XML Comtent through HTTP between JSP Pages
Why servlet has to reload the content after invoking doPost or DoGet
Problem with TagLib
MyEclipse, The Clear Choice