You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by co...@abilsoft.com on 2003/05/15 19:03:27 UTC
Form and ENCTYPE=multipart/form-data
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> </td>
<td>
<textarea name="note" rows="22" cols="80"></textarea>
</td>
</tr>
<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