tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: POST file via Form & O'Reilly lib & Tomcat problems
Date Fri, 22 Jun 2001 11:06:17 GMT

	Unfortunately I don't have an answer as to why you can't upload, but
I can give you a little information that might help you.

	First, when using Jason Hunter's library, request.getParameter won't
work.  His library reads the entire posting and then provides methods to get
the parameters back.  So Tomcat 4m5 might work.

	Second, you are not running Tomcat behind Apache or any other web
server.  Therefore, you are not using AJP13 or AJP12.  You are using HTTP as
your protocol (as the stack trace lists).  

	I am using Tomcat 3.2.1 to receive binary files (on the order of
100K - 1M, Excel and Access files) without any problems over HTTP.  If this
request if coming from a program, I would look at how its building the
headers, because that is where the problem is (readHeaders).  Otherwise, I
don't think I can be of much help.

	Randy


> -----Original Message-----
> From: Adam Kirby [mailto:a.kirby@qut.edu.au]
> Sent: Friday, June 22, 2001 2:14 AM
> To: tomcat-user@jakarta.apache.org
> Subject: POST file via Form & O'Reilly lib & Tomcat problems
> 
> 
> I'm having problems trying to upload a file to a servlet.
> 
> The problem occurs when we use a HTML form to POST a binary to a
> servlet.  Very small files (~100 bytes) work fine but anything above
> (~350 bytes) throws the exception listed 
> below.
> 
> Tomcat version is 3.2.1, the server is Red Hat Linux release 
> 7.0, Kernel 
> 2.2.16-22.  We are using Jason Hunter's multipart request handling
> servlets 
> (www.servlets.com/cos).
> 
> Shifting to 3.2.2 and 3.3-m3 did not resolve the issue.  Shifting to
> Tomcat 4.0-b5 did resolve this problem but raised others
> (request.getParameter(String) did not function).
> 
> The problem is listed in the FAQ for Jason Hunter's library
> (http://www.faqtory.com/servlets/) but the solution seems outdated.
> 
> Searching the archives for this list gave similar cases of 
> this problem,
> but no solutions that worked for me.  The list commonly suggested that
> it was a bug with AJP13 and that reverting back to AJP12 will fix. 
> However, I've checked our conf/tomcat.conf file which claims we are
> using AJP12.
> 
> Any ideas, work-arounds or feedback will be greatly appreciated.
> 
> Thanks,
> 
> Adam.
> 
> The stack-trace for the exception thrown by Tomcat 3.2.1 is:
> 
> 2001-06-21 04:08:17 - ContextManager: Error reading request, 
> ignored - 
> java.lang.ArrayIndexOutOfBoundsException
>         at 
> org.apache.tomcat.service.http.HttpRequestAdapter.parseHeaderF
> iled(HttpRequestAd
> apter.java:224)
>         at 
> org.apache.tomcat.service.http.HttpRequestAdapter.readHeaders(
> HttpRequestAdapter
> .java:205)
>         at 
> org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequ
> est(HttpRequestAda
> pter.java:140)
>         at 
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConne
> ctionHandler.java:1
> 95)
>         at 
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>         at 
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.java:498)
>         at java.lang.Thread.run(Thread.java:484)
> 

Mime
View raw message