cURL / Mailing Lists / curl-library / Single Mail

curl-library

problem with post request on a TOMCAT server

From: Arnaud VALLEE <avallee_at_telisma.com>
Date: Thu, 6 Jun 2002 16:40:22 +0200

Hello all,

As i am making my first steps with libcurl, i have got a problem with a post request.
My post request look like this:

About to connect() to absinthe:80
Connected to absinthe (192.168.1.50) port 80
POST /TestCharge/submit/sub.jsp HTTP/1.0
Host: absinthe
Pragma: no-cache
Connection: close
User-Agent: myClientHttp
Cache-Control: no-cache
Content-Length: 19
Content-Type: application/x-www-form-urlencoded

var2=huphup&num=2

The tomcat server send me this:

<h1>Error: 500</h1>
<h2>Location: /TestCharge/submit/sub.jsp</h2><b>Erreur Interne de Servlet:</b><br><pre>javax.servlet.ServletException: Le flux d''entréé (InputStream) est déjà retenu pour cette requête.
        at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
        at submit._0002fsubmit_0002fsub_0002ejspsub_jsp_0._jspService(_0002fsubmit_0002fsub_0002ejspsub_jsp_0.java:126)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)
</pre>
<b>Cause racine:</b>
<pre>java.lang.IllegalStateException: Le flux d''entréé (InputStream) est déjà retenu pour cette requête.
        at org.apache.tomcat.facade.HttpServletRequestFacade.getReader(HttpServletRequestFacade.java:271)
        at submit._0002fsubmit_0002fsub_0002ejspsub_jsp_0._jspService(_0002fsubmit_0002fsub_0002ejspsub_jsp_0.java:92)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
        at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)
</pre>

I do almost exactly the same request with another http client the response from the web server is OK.
If anybody have any idea on that issue, it would be very helpful.

Kind Regards,

Arnaud.

--------------------------------------------------------------------------------------------
 <<Arnaud VALLEE.vcf>>

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

Received on 2002-06-06