This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes servlet to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet to servlet" Watch "servlet to servlet" New topic

servlet to servlet

Per Lovdinger
Ranch Hand

Joined: Jun 11, 2001
Posts: 35
I have a ServletA that forwards requests to ServletB.
ServletA reads a file as a stream and that stream should be passed to ServletB as
inputStream. How can this simpliest be achieved ?
I know that ServletA can open an urlConnection and write to that ?
Is that the only solution ?
thanks in advance
Ricardo Marques

Joined: May 08, 2002
Posts: 27
I think you could try to put the stream into session in servletA, get it from session from ServletB and use it as you wish. Maybe I'm missing something, but this should do the trick.

Sun Certified Programmer for the Java 2 Platform 1.4<p>If I can create, I will make mistakes. If I can learn with them, it must be some kind of art.
I agree. Here's the link:
subject: servlet to servlet