Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
    Bookmark Topic Watch Topic
  • New Topic

how to transfer Streams from one servlet to another servlet

 
HenaPriyadarsini Kaki
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

------------------Please Help me

Is there any other way to transfer the file Streams from one servlet to another servlet .

Using TomcatServer.

In my code I have 2 servlets.

In my firstServlet Iam writing the FileInputstream into response object and forwarding it.

In my SecondServlet Iam writing the Inputstream into FileOutputStream object.

but Iam unable to forward the request from first servlet using RequestDispatcher's forward(req,res) method (getting exception as response is already commited before forwarding)

help me
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic