You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrey Grebnev <fo...@udm.ru> on 2005/04/28 09:24:37 UTC
Encoding problem during authentication
Hello,
I have a problem under following environment:
- Windows XP SP2
- JDK 1.4.2_04
- Tomcat 5.5.9
- Struts 1.2.4
I use characterEncodingFilter to setup UTF-8 encoding
into request before
using the content of the request. When I submit form with
POST
method it works well. I use FORM based authentication.
However if I perform the following steps I have the
problems with
encoding:
1. Open JSP with HTML form which submit some UTF-8 string
data using POST
method.
2. Waiting when the HTTP session is invalidated (session
timeout).
3. Submit the form.
4. Because session is invalidated I need to
re-authenticate myself.
5. After success authentication The processing of the
original request is
continued.
6. The data of the form (from first step) is saved in
incorrect
encoding.
I suppose that Valve (FormAuthenticator) which
responsible for authentication is
processed earlier then characterEncodingFilter and the
parameters from
POST request are parsed using
DEFAULT_CHARACTER_ENCODING="ISO-8859-1" when the original
request
information is saved into session.
I have tried to specify
enctype="application/x-www-form-urlencoded;
charset=utf-8" attribute for my FORM tag. But e.g.
Mozilla browser
specify only Content-Type:
application/x-www-form-urlencoded header
and cut out specified charset.
Any ideas?
--
Best regards,
Andrey Grebnev
----------------------------------------------------
Треть суток на треть дешевле!
МАРК-ИТТ ввёл льготные цены на ночной трафик в Народном Интернете
цены на трафик на 30% ниже дневных в период с 1:00 до 9:00.
600-й - 1.75р, Профессиональный - 1.89р, Деловой - 1.96р, 5-ка - 2,03р, Домашний - 2,10р
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org