Re: [OT] JSP parameter frustration

Knut Forkalsrud <[email protected]> Wed, 05 Jul 2006 15:33:47 -0700
Newsgroups gmane.text.xml.resin.user
Organization Commission Junction
Message-ID <[email protected]>
Watch out for the character sets.  The HTTP spec elegantly avoids that
issue.  For practical purposes most browsers will encode for values
using the same character set as the document the form came in.
Otherwise you just have to pick one, as described in

http://www.caucho.com/resin-2.1/ref/app-config.xtp#character-encoding

Knut Forkalsrud



Eric Carlson <[email protected]> writes:

> On Wed, 5 Jul 2006 14:16:43 -0400, you wrote:
>
>>The servlet container is responsible for decoding the parameters for  
>>you before it sets them into the HttpServletRequest object, so don't  
>>double-decode it.
>>
>>Tony
>
> Thanks. If I undersand you, thats means I should use this
>
> String param = request.getParameter("p");
> byte[] paramArray = param.getBytes();
> for (int i =0; i<param.length(); i++) {
>  System.out.print(paramArray[i]);
> }
>
> (Which I actually started with) - but it still gives the wrong values.
>