tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: TC 9.0.21: ContextListener + Servlet app
Date Sun, 16 Jun 2019 05:39:27 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 6/14/19 16:48, Mark Thomas wrote:
> On 14/06/2019 21:10, Tommy Pham wrote:
>> 2)  I Have this small and simple HTML form: <form method="post"> 
>> <p><input id="text" type="text" size="80"></p> <p><input
>> type="submit" value="enter"></p> </form> My servlet's doPost is
>> triggered but when I iterate the request.getParameterMap(), it's
>> empty.  When I tried to request.getParameter("text"), it returned
>> 'null'.  I do have a filter in place but it's only to log all
>> request access to a database backend eventually.  That filter is
>> currently dumping it to log.  I've tried disabling the filter but
>> have the same result.
> 
> You need: <form method="post"
> enctype="application/x-www-form-urlencoded">

This is the default value for enctype.

Surprisingly, browsers do not use the value for "id" as the "name"
when a name is not specified for an <INPUT> tag. Without a "name"
attribute, the form element is not sent to the server. :(

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl0F1g8ACgkQHPApP6U8
pFigTxAAvz0IWpqm4dRij80R25AYq36z4HKWN59xqqdDM8sxmEd4VIDvKxZAisup
mxrsu4DXkKch8wK2B596EqCDaRVbIKMDMHiEXCemeRkTggoj7mf2T/O/6hxQcyti
BXfC0LWn/9PeepJy3ONC1QO+83mUGx6XnM+V/40C189I3tGJ2ogYXMGm0MVf3QA0
GieIs9Joq5Wa/owheYUWPOFsI6g5zs3dRgz+Ggbm6xOCcA5Yyqm4Y7xqGNBc9tDk
L2UsgNsl6XxWyo296lWci1JjAw5x5TN46E9wcqt6lc4mSsM35Xm1dXqngvPkkByd
yoCmWm1yBYufSR8PY3z0DzbFThpxE8Y/kHphci3Qomiyk8eelLmcVneNPzvmrSgL
nDxQfVpWd/cYm4rnNklJEK2Lt6O+M6GJ737nyyzwCpGGkRKQNW1Gnh+V0WY/baUN
djZwgMGrYh9SKutFOOx5ykFiVX+DVgCgxyH7I/dw5tMKNL3zox6vKXCTFZLIE6PZ
AM/9ac9wwedJ7bekGXzFdYlQdvZSCEyXW10Llv2GWXUIRsK6SSGTXucaXCzys7k3
QNzGnOw/j1AR7XCayoncz/GriwSkLKvHj44IYq52q4zlznRKHYq0vQiIxZ9C6U+2
nAlBXiqEyYB0N6ZamNT/D9ZJREAUxgEwL6c5mdN46ZP5ms1ejtA=
=mz76
-----END PGP SIGNATURE-----

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


Mime
View raw message