tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: unified doXXX()
Date Tue, 02 Mar 2010 18:05:56 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aryeh,

On 3/2/2010 1:51 AM, Aryeh M. Friedman wrote:
> Yes we are and thats why I probably mistook the effect of it doing that
> as a side effect instead of a designed in feature... now that being said
> we have used that content day since the first few lines of our code was
> written and until this post (about 2 years) the servlet getting
> getParameter via GET *AND* POST was not an issue... but for some reason
> a new client side request format (which there is no easy way around not
> using) messed it up.

Ok, so what's next? Sometimes you are getting a null when you expect
data, right? Well, are you only getting null when the request is a GET?
POST? Or is it something else?

If you wanted to get cute, you could implement this
one-parameter-to-rule-them-all strategy as a Filter which wraps the
request and provides a simpler getParameter interface to your webapps.
Instead of this:

String everything = getParameter("everything");
String specific = parseSpecific(everything);

You could have your webapp code simply do this:

String specific = request.getParameter("specific");

... then the request wrapper does all the work to gather the parameter
information from the right place, decode it, and return the data to the
caller.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuNU4QACgkQ9CaO5/Lv0PDchQCgrQnhx7BOyqAXLBkBxPw0UHz8
Ak8AoJRNRyGI22Be11LjM4mS7bkRSmOt
=9AtG
-----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