Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling servlet from another servlet and reading response

 
coooolmagic Magic
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a servlet (ImageServlet) with doGet method. This servlet returns a PNG image as response.

I have a situation where I need to call this ImageServlet from another servlet.

I want to read the response of ImageServlet in this servlet and put that image into an excel sheet which i am creating using POI API.

Pleashelp me as I am struggling to find the solution.

I am not getting it that how would I get hold of response as an image.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
coooolmagic Magic wrote:I have a situation where I need to call this ImageServlet from another servlet.

This is indicative of a design issue. Rather than trying to call one servlet from another, factor the common code out into a utility class that both servlets can use.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic