uploading from a servlet to another servlet running elsewhere

Hi Guys,

I just wanted to know if I have a servlet running on one container which gets a request from a client. Now it processes this request and sends a response which in my case is a multipart post fileupload to another client.

Can a servlet upload to another servlet running on anohter web container?

Regards,

Elemental.

[355 byte] By [Elementala] at [2007-11-27 8:09:15]
# 1
Only using an API like HttpClient. http://jakarta.apache.org/commons/httpclient/It has an example program demonstrating how to do a multipart request.
gimbal2a at 2007-7-12 19:52:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Well no, thats not the point, I already have code written using the commons.fileupload from jakarta. And it is not working as I expect it. There must be some kinks that I have to iron out but I was just wondering if conceptually if I have a servlet that I have deployed in Oracle Application server and it gets a request, can it than post a request to another servlet running on another web container, tomcat in my case. Actually the Tomcat servlet is my test client. This was for me the proof of concept and an example servlet for client users of my OAS servlet.

So summarizing, I get a multipart post request to my OAS servlet which contains a file, I take the file (using jakarta's fileupload libs) and then process it and again do a mulitpart post to the servlet running in Tomcat whose invocation url I know off. That conceptually sounds fine for servlets right ? That is all I wanted to know.

Elementala at 2007-7-12 19:52:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
To communicate between Servlets running on different servers you will need to make an HTTP request. In other words the first server will act as a client or browser to the second server. To do this easily you can use the Apache HttpClient as recommend above.
tolmanka at 2007-7-12 19:52:13 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...