Write once debug everywhere... Thursday, July 21, 2005

Oh, the joy of Websphere on HPUX.
First, I discover that UTF-8 character encoding is not supported without some plugins to the appserver. How the hell is UTF-8 not supported? weak
Next, I discover that url parameters are not decoded. So, if you have a param &foo=this%20is%20cool and call String foo = request.getParameter("foo"); you get foo.equals("this%20is%20cool"); Seems every other appserver (J2EE or not) will decode url parameters automatically. So, now everything has to be wrapped in URLDecoder.decode(request.getParameter(...
Struts forms, all sets need to be changed as well;
instead of:
public void setFoo(String val){ this.foo=val; }
you need
public void setFoo(String val){ this.foo=URLDecoder.decode(val); }
One might think, IBM would choose to have their app server behave the same on every OS. LOL
This is the kind of crap I'd expect from oracle. HPUX sucks enough on its own.
I really want these methods to not use the deprecated and actually say:
URLDecoder.decode(param,"UTF-8")
But, as mentioned, UTF-8 is not an option. As Cartman would say, "weeak".


<willCode4Beer/> posted at 8:31 AM

0 Comments:

Post a Comment

<<< This way to the egress