Hi Alvin,

Here you assume that hashtable returned by HttpUtils.parsePostData contains
String[] as vaules.
But conforming to JDBC 2.0 API (HttpUtils) they say that only
"Keys with multiple values have their values stored as an array of strings"
Wich means the hashtable may return:
plain String, String[] array or null when someone linked an href or other
form to your servlet, without posting valid "name" and "password" fields,
and is safer to check all these conditions.


Cezar

On Fri, 26 Mar 1999, Alvin, lau wrote:
[snip]
>  java.util.Hashtable ht = HttpUtils.parsePostData(
>     req.getContentLength(),req.getInputStream());
>  String name[] = (String[])ht.get("name");
>  String password[] = (String[])ht.get("password");
[snip]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to