tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cont...@abilsoft.com
Subject Form and ENCTYPE=multipart/form-data
Date Thu, 15 May 2003 17:03:27 GMT
Hello:

I'm having a problem with the following form generated in a servlet:

<form ENCTYPE="multipart/form-data" name="sendForm" method="post"
          action="/mail/send" >

    <tr>
        <td>To:</td>
        <td>
            <input type="text" name="to" size="80" value=""></input>
        </td>
    </tr>

    <tr>
        <td>Cc:</td>
        <td>
            <input type="text" name="cc" size="80" value=""></input>
        </td>
    </tr>
    <tr>
        <td>Bcc:</td>
        <td>
            <input type="text" name="bcc" size="80" value=""></input>
        </td>
    </tr>

    <tr>
        <td>From:</td>
        <td>
            <input type="text" name="from" size="80" value="foo@xyz.com"></input>
        </td>
    </tr>

    <tr>
        <td>Attachment:</td>
        <td>
            <input type="file" name="attachments" size="65">
        </td>
    </tr>

    <tr>
        <td>Subject:</td>
        <td>
            <input type="text" name="subject" size="80" value="">
            </input>
        </td>
    </tr>

    <tr>
        <td>&nbsp;</td>
        <td>
            <textarea name="note" rows="22" cols="80"></textarea>
        </td>
    </tr>
    &nbsp;
    <input type="hidden" name="msgnum" value=""/>
    <tr>
        <td colspan="2">
            <center>
                <input type="button" name="Cancel" value="Cancel"
                    onclick="javascript:window.location.href='mail';">
                </input>
                <input type="submit" name="Send" value="Send"></input>
            </center>
        </td>
    </tr>

</form>

It works perfectly until I add the enctype="multipart/form-data" line in order to support
the <input type="file"...> entry.  When I add this enctype line, none of the input attributes
are returned in the request (regardless of type)???  As long as the enctype is not there,
everything (excpet for the file input of course) works as expected.  Can anyone shed any light
on this?  I'm using an embedded Catalina inside of JBoss if that matters.

Many thanks in advance!!!

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message