On Mon, 12 Mar 2001, Mike Slinn wrote:
> The following JSP (test.jsp) calls itself for processing. Unfortunately, it
> doesn't display after the form is submitted, unless
> enctype="multipart/form-data" is omitted. As far as I can see from scanning
> the archives, there is/was a bug that prevents JSPs from working with file
> uploads, although servlets work. Is this still the case for Tomcat 3.2.1
> standalone?
>
> <%@ page %>
> <html>
> <body bgcolor=white>
> <form action="test.jsp" method=post enctype="multipart/form-data">
> File to verify: <input type=file name=file>
> <input type=submit value=Validate name=submit>
> </form>
> </body>
> </html>
>
It's not a bug, but it is an unimplemented feature. You are trying to do
something not supported by the specs.
The servlet spec defines processing of request parameters *only* if the
encoding type is the default. The JSP spec relies on standard servlet
functionality for extracting request parameters. Neither spec includes
any support for file uploads. In order to process file uploads, you
will need to utilize a servlet, and one of the available upload processing
libraries.
> Mike Slinn
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]