Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Including jsp output in a servlet

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not cross post. Continue the conversation here.
 
Tomorrow is the first day of the new metric calendar. Comfort me tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic