aspose file tools
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
Register / Login


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: 56554
    
  14

Please do not post the same question more than once.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to transfer Streams from one servlet to another servlet
 
Similar Threads
Client Sockets...
Forwarding from doPost to doGet
problem in using request.getHeader()
Passing Request
How to Transfer File Streams from One Servlet to another Servlet