if ( pos > 0 )
            url = url.substring(pos);
Found a bug in that this should be pos+1 to remove the "?".

            if ( paramAndValue[0].equals(paramName) )
                return true;
We're also doing a URLDecoder.decode on the paramAndValue[0] in case the param name was encoded (though in practice it's rarely done).


Wouldn't be faster/less coding if you just use this?

URL aURL = new URL(url);
String urlParams = aURL.getQuery();
if (urlParams.contains(paramName)) {
// proccess as needed if paramName exists
} else {
// process as otherwise
}
That would find the paramName even if was a substring of a param name or the param value. That is, if I'm checking if param "name" exists, and the URL query string was "firstname=bob" or "sort=nameOrder" that code would say "name" exists but no such "name" param is there.

David


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to