parameters encoding & struts

M

Malcolm

Hi all,

When I create a simple web-application that gets data collected on page
a.jsp and prints it on page b.jsp I specify on the top of each page in
contentType parameter charset of koi8-r (neccessary for russian
support). Then I fill in the form on page a.jsp with russian symbols and
submit it. Now I have to specify request.setCharacterEncoding("koi8-r")
before calling the first getParameter(...) method. And I've got several
questions about it:
1. Is it possible to set default charset to koi8-r rather than
iso-8859-1 for the whole web-application?
2. Where can I insert request.setCharacterEncoding("koi8-r") when using
Struts so that it's done before Struts starts processing parameters from
the form (because it decodes them using default encoding)?
3. Does Struts have any means to handle the problem of getting the
values from the form in right codepage in other way than I do?

I would appriciate your help!

Best regards, Yevgen Malafeyev AKA Malcolm.
 
M

Malcolm

Hi, all.
When I create a simple web-application that gets data collected on page
a.jsp and prints it on page b.jsp I specify on the top of each page in
contentType parameter charset of koi8-r (neccessary for russian
support). Then I fill in the form on page a.jsp with russian symbols and
submit it. Now I have to specify request.setCharacterEncoding("koi8-r")
before calling the first getParameter(...) method. And I've got several
questions about it:
1. Is it possible to set default charset to koi8-r rather than
iso-8859-1 for the whole web-application?
2. Where can I insert request.setCharacterEncoding("koi8-r") when using
Struts so that it's done before Struts starts processing parameters from
the form (because it decodes them using default encoding)?
3. Does Struts have any means to handle the problem of getting the
values from the form in right codepage in other way than I do?

Help's not neccessary any more. I handle this problem by using Filter to
the action servlet.

Best regards, Yevgen Malafeyev AKA Malcolm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top