Just try URLEncoder class of Java.
by the way, would you mind telling me the way u use
"
String defaultEncode = "UTF-8";
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
req.setCharacterEncoding(defaultEncode);
res.setCharacterEncoding(defaultEncode);
chain.doFilter(req, res);
"
if you have a bean and after ur form is submitted, all values of text fields (properties) in form will be mapped to 1 bean.
where will you use " String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res); " to encode data before data of form is mapped to bean ?
regards
Pham
----- Original Message ----- From: "Hond4" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Friday, April 15, 2005 4:50 PM
Subject: Struts & UTF-8 (POST working, GET not)
Hallo,
I have fllowing problem with my Struts app on Jboss. Here is my filter String defaultEncode = "UTF-8"; HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse res = (HttpServletResponse) response; req.setCharacterEncoding(defaultEncode); res.setCharacterEncoding(defaultEncode); chain.doFilter(req, res);
problem is that when I submit my form with POST everything works just fine, when I change form submit method to GET i have problems with characters.
here is my example: UTF-8: płyn URL: p%C5%82yn
any idea what's wrong with my app? Best regards,
H0nd4
--
Castingi do trzeciej edycji Konkursu Elite Model Look już 16 i 17 kwietnia w Twoim mieście. Więcej informacji na stronie http://www.gazeta.pl/elitemodellook
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]