This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to transfer Streams from one servlet to another servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

how to transfer Streams from one servlet to another servlet

HenaPriyadarsini Kaki
Greenhorn

Joined: Aug 30, 2008
Posts: 2
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

Joined: Jan 10, 2002
Posts: 63351
    
  70

Please do not post the same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to transfer Streams from one servlet to another servlet
 
It's not a secret anymore!