You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Craig Altenburg <cr...@blueridge.com> on 2000/04/24 17:54:17 UTC

jsp with multipart form data

I'd like to be able to process the results of an html form with a "file" input
field with a jsp.  The form uses POST with an enctype of "multipart/form-data".

When I submit the form data I get an Internal Server Error.

The apache access_log shows the POST request

The apache error_log shows "Premature end of script headers"

The apache mod_jserv.log shows:
         (EMERGENCY) ajp12[1]: cannot scan servlet headers (500)
         (ERROR) and error returned handling request via protocol "ajpv12"

The tomcat logs show nothing at all.

This is probably a bug in mod_jserv that should be fixed.

 -- 
Craig Altenburg


Testing Data

Posted by Roy Truelove <ro...@binghamton.edu>.
Hello,

    Does anyone have / know of test results with Tomcat?  What I'd like to
know is how feasible it is to use Tomcat for mission critical jobs, when
JServ, JRun, Netscape etc.. are out there and have proven themselves.  I'd
really *like* to use Tomcat, but can't take the risk if it hasn't been
tested in a real-world situation.

Thanks
Roy


RE: jsp with multipart form data

Posted by Travis Reeder <tr...@xabre.com>.
Go to Oreilly's www.servlets.com and grab their servlet classes.  They have
one that handles multipart requests quite nicely.

Travis Reeder
Director, Internet Technologies
Xabre.com


-----Original Message-----
From: Harindranath P. R. Nair [mailto:hari.nair@alopa.com]
Sent: Monday, April 24, 2000 10:30 PM
To: general@jakarta.apache.org
Subject: RE: jsp with multipart form data


I am not sure if this is according to specs. Servlet engines don't seem to
handle POSTs with multipart/form-data encoding.
In a servlet the post data is available from the input stream. So in our
case you could use a servlet as the target of your POST.
In the servlet get the content length and input stream and use
HttpUtils.parsePostData to get the variables.

This problem bit me in a different case. Netscape's URLConnections use
multipart/form-data. So POSTing from an applet hit this.

> -----Original Message-----
> From: Craig Altenburg [mailto:craiga@blueridge.com]
> Sent: Monday, April 24, 2000 9:24 PM
> To: general@jakarta.apache.org
> Subject: jsp with multipart form data
>
>
> I'd like to be able to process the results of an html form with a
> "file" input
> field with a jsp.  The form uses POST with an enctype of
> "multipart/form-data".
>
> When I submit the form data I get an Internal Server Error.
>
> The apache access_log shows the POST request
>
> The apache error_log shows "Premature end of script headers"
>
> The apache mod_jserv.log shows:
>          (EMERGENCY) ajp12[1]: cannot scan servlet headers (500)
>          (ERROR) and error returned handling request via protocol >
"ajpv12"
>
> The tomcat logs show nothing at all.
>
> This is probably a bug in mod_jserv that should be fixed.
>
>  --
> Craig Altenburg
>
>
> ----------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org

Regards,
- Hari.
--

+-------------------+----------------------------+
|P. R. Harindranath | email: hari.nair@alopa.com |
+-------------------+----------------------------+
|Alopa Networks     | phone: +91-80 2225779      |
+-------------------+----------------------------+
|Bangalore, India   |        +91-80-2998601      |
+-------------------+----------------------------+



RE: jsp with multipart form data

Posted by "Harindranath P. R. Nair" <ha...@alopa.com>.
I am not sure if this is according to specs. Servlet engines don't seem to
handle POSTs with multipart/form-data encoding.
In a servlet the post data is available from the input stream. So in our
case you could use a servlet as the target of your POST.
In the servlet get the content length and input stream and use
HttpUtils.parsePostData to get the variables.

This problem bit me in a different case. Netscape's URLConnections use
multipart/form-data. So POSTing from an applet hit this.

> -----Original Message-----
> From: Craig Altenburg [mailto:craiga@blueridge.com]
> Sent: Monday, April 24, 2000 9:24 PM
> To: general@jakarta.apache.org
> Subject: jsp with multipart form data
>
>
> I'd like to be able to process the results of an html form with a
> "file" input
> field with a jsp.  The form uses POST with an enctype of
> "multipart/form-data".
>
> When I submit the form data I get an Internal Server Error.
>
> The apache access_log shows the POST request
>
> The apache error_log shows "Premature end of script headers"
>
> The apache mod_jserv.log shows:
>          (EMERGENCY) ajp12[1]: cannot scan servlet headers (500)
>          (ERROR) and error returned handling request via protocol >
"ajpv12"
>
> The tomcat logs show nothing at all.
>
> This is probably a bug in mod_jserv that should be fixed.
>
>  --
> Craig Altenburg
>
>
> ----------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org

Regards,
- Hari.
--

+-------------------+----------------------------+
|P. R. Harindranath | email: hari.nair@alopa.com |
+-------------------+----------------------------+
|Alopa Networks     | phone: +91-80 2225779      |
+-------------------+----------------------------+
|Bangalore, India   |        +91-80-2998601      |
+-------------------+----------------------------+