Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling servlet from another servlet and reading response  RSS feed

 
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
Posts: 66203
151
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!