-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Johnny,
Johnny Kewl wrote:
| Dave this is how I do it...
|
| Enumeration paramNames = request.getParameterNames();
Go back and read the OP: he says that he's got a String and he wants to
treat it as a URL and check for parameters. He's not looking for
parameters in the current request.
| while(paramNames.hasMoreElements()) {
| paramName = (String)paramNames.nextElement();
| if(paramName.compareToIgnoreCase("save") == 0){
| //Do something useful
| paramValue = request.getParameter(paramName);
| } }
This implementation is wrong, because URL parameters are case-sensitive.
It's also stupid, since the easier implementation would be:
boolean paramIsDefined = null != request.getParameter(paramName);
:(
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiZ29wACgkQ9CaO5/Lv0PCIzQCdEgtZeMJ5p1N/gKOgSZy3HJ0x
A/gAoKRZKViJyHRckdFJdKiYFMgABg19
=WlJR
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]