tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Jones <richard.jo...@ub.uib.no>
Subject Re: Character encoding question
Date Mon, 29 Aug 2005 11:00:29 GMT
Hi,

> The setCharacterEncoding() must be called on the request before any
> getParameter() method is invoked on it. There may be some filters that
> is processing the request in the filter chain before the setCharacter
> encoding filter.

Yeah, I think this was the problem with the RequestDumperValve.  I don't
think there are any other filters which happen before the main servlet
processing.  We have a super-servlet which does setCharacterEncoding
before the extending servlet touches anything, so it should be ok.

> Also what is the character encoding used by the OS ?. 

My /etc/sysconfig/i18n file says:

LANG="en_US.UTF-8"
SUPPORTED="en_US.UTF-8:en_US:en:nb_NO.UTF-8:nb_NO:nb"

Perhaps nb_NO and nb should be suffixed with .UTF-8?

> URIEncoding method is useful with GET methods since the parameters are
> sent along with the URL. Try using POST methods everywhere and check
> for problems. To be safe I am using hidden variables and sending data
> as POST instead of appending it to the URL.

I generally prefer POST also, but we are working with a community
developed package, and there are plenty of places where GET is used.
I've just spent a moment testing an area of the system where the GET
implementation was causing serious problems and this now appears to be
working correctly (now that URIEncoding is set in the Connector).

Cheers,

-- 
Richard
-------
Richard Jones                    |
Overingeniør                     | Senior Engineer
Universitetsbiblioteket i Bergen | University of Bergen Library

e: richard.jones@ub.uib.no
t: +47 55 58 25 37

BORA: http://bora.uib.no/



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message