tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 国炳 陈 <gzlongzhij...@yahoo.com.cn>
Subject Re: Encoding problem during authentication
Date Sat, 30 Apr 2005 07:20:18 GMT
???

Andrey Grebnev <fox@udm.ru> wrote:Hello,

I suppose I found the problem with Tomcat. I have already
write about it into tomcat-user mailting list but I did not
get feedback.

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-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org




祝福你开心生活每一天!
\\\|///
\\ - - //
( @ @ )
┏━━━━ ━━oOOo- (_)-oOOo━━
┃姓名:gzlongzhijian 
┃QQ(OICQ) 40831127 (请大家Q我) 
┃信箱:gzlongzhijian@yahoo.com.cn 
┃主页:http://www.gzlzj.com 
┃广州市石牌西路西华大街二巷二号401 
┃邮编:510630 电话:020-33629058 
┃ 
┃茫茫人海,相识你是我的福份; 
┃ 
┃岁月如梭,送上我口里喊出的祝福 
┃ Oooo 
┗━━━━━━━ oooO━ ( )━━
( ) ) /
\ ( (_/
\_)



---------------------------------
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message