This is the mail archive of the
rhug-rhats@sources.redhat.com
mailing list for the RHUG project.
Post request with gcj and tomcat
- From: Christophe Roux <ch_roux at club-internet dot fr>
- To: green at redhat dot com
- Cc: rhug-rhats at sources dot redhat dot com
- Date: Mon, 17 Jun 2002 20:49:10 +0200
- Subject: Post request with gcj and tomcat
I contacted Anthony Green about a problem with servlet using tomcat and gcj.
As it seems it can interest the community, I send this mail.
My goal is simple : I want to send a POST Http request from one servlet to an
other.
I developed two small servlets M1 and M2 in order to test why it does not
work so easily.
The M1 servlet wait for the second M2 which never answers.
After a few investigations it appears that the
piece of the puzzle is gnu.gcj.protocol.http.Connection.
Reading it, I found something strange : it is as if the class uses a
ServerSocket for doing it's buziness; it starts with writing the header of
the
request, then tries to "getHttpHeader", then looks for InpuStream and then
OutputStream.
In fact, it should first write the header, then wait for a getOutputStream
and then a getInputStream.
I am not very easy with Sockets so I do not know how it works, but I think
options should tell if input is before or after output.
I hope I can help you to discover what happens.
Bye
Christophe Roux