On 02/07/2010 14:21, Andr=E9 Warnier wrote:
> Murat Birben wrote:
>> Ok, here is the html form:
>>
>> <form action=3D"ResourceUploadServlet" method=3D"POST"
>> enctype=3D"multipart/form-data">
>> <input type=3D"file" name=3D"Content" />
>> FileName :<input type=3D"text"
>> name=3D"FileName" />
>> Path :<input type=3D"text" name=3D"Pat=
h" />
>> <input type=3D"submit" value=3D"Submit" />=
>> </form>
>>
> Ok.
> First, you should probably change the <form> tag as follows :
> <form action=3D"/ResourceUploadServlet" method=3D"POST"
> enctype=3D"multipart/form-data">
Better:
action=3D"<%=3D request.getContextPath() %>/ResourceUploadServlet"
Even better:
action=3D"<%=3D response.encodeURI(request.getContextPath() +
'/ResourceUploadServlet') %>"
p
> Next:
> When the browser sends this to the server, it will do this using a
> particular format, similar to the (internal) format of an email with
> attachments.
> This is what the part : enctype=3D"multipart/form-data" is all about. A=
re
> you familiar with this ?
>=20
>=20
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>=20
|