You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sergey Livanov <se...@ukrpost.net> on 2003/05/10 21:31:53 UTC
RE: EREZ !
Yes, You absolutely right!
EE> Let me understand more - when you fill a form field while in the browser you can see the letters that you type correctly?
YES !!!
And it's only after you
EE> click submit that the value of the property is set to ???? instead of what you typed? Do you have the
EE> <%@ page contentType="text/html;charset=Windows-1251" language="java" %> in your page? And did you remember to put the
YES !!! I've put
JSP:
<%@ page language="java"
session="true"
isThreadSafe="true"
contentType="text/html; charset=windows-1251"%>
Action servlet:
try {
request.setCharacterEncoding( "windows-1251" ) ;
}
catch ( UnsupportedEncodingException ex ) {
}
response.setContentType( "text/html; charset=windows-1251" ) ;
and the ERROR OCCUR AGAIN !!!
EE> request.setCharacterEncoding("Windows-1251");
EE> ?
EE> Erez
EE> -----Original Message-----
EE> From: Sergey Livanov [mailto:sergey.livanov@ukrpost.net]
EE> Sent: Saturday, May 10, 2003 8:42 PM
EE> To: struts-user@jakarta.apache.org
EE> Subject: RE i18n, EREZ
EE> Thank you Erez, I've put
EE> try { request.setCharacterEncoding...
EE> }
EE> catch {
EE> UnsupportedEncodingException ...
EE> }
EE> code in Action class but the error occur again !!!
EE> Sergey .
EE> --
EE> Укрпост - продвинутая почта. http://www.ukrpost.net/
EE> IMAP POP3 NNTP RSSNews Unicode.
EE> ---------------------------------------------------------------------
EE> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
EE> For additional commands, e-mail: struts-user-help@jakarta.apache.org
--
Best regards,
Sergey.Livanov mailto:Sergey.Livanov@ukrpost.net
--
Укрпост - продвинутая почта. http://www.ukrpost.net/
IMAP POP3 NNTP RSSNews Unicode.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: EREZ !
Posted by Erez Efrati <er...@netmedia.net.il>.
Sergey,
The following part should be located in some sort of a base ActionForm
for example MyBaseForm , in the reset() method:
public void reset(
ActionMapping mapping,
HttpServletRequest request)
{
super.reset(mapping,request);
try {
// setting the character encoding here is very
important
// to overcome the problem regarding to the
Tomcat server.
request.setCharacterEncoding("windows-1251");
}
catch (UnsupportedEncodingException ex) {
}
...
}
-- Erez
-----Original Message-----
From: Sergey Livanov [mailto:sergey.livanov@ukrpost.net]
Sent: Saturday, May 10, 2003 9:32 PM
To: struts-user@jakarta.apache.org
Subject: RE: EREZ !
Yes, You absolutely right!
EE> Let me understand more - when you fill a form field while in the
browser you can see the letters that you type correctly?
YES !!!
And it's only after you
EE> click submit that the value of the property is set to ???? instead
of what you typed? Do you have the
EE> <%@ page contentType="text/html;charset=Windows-1251"
language="java" %> in your page? And did you remember to put the
YES !!! I've put
JSP:
<%@ page language="java"
session="true"
isThreadSafe="true"
contentType="text/html; charset=windows-1251"%>
Action servlet:
try {
request.setCharacterEncoding( "windows-1251" ) ;
}
catch ( UnsupportedEncodingException ex ) {
}
response.setContentType( "text/html; charset=windows-1251" ) ;
and the ERROR OCCUR AGAIN !!!
EE>
request.setCharacterEncoding("Windows-1251");
EE> ?
EE> Erez
EE> -----Original Message-----
EE> From: Sergey Livanov [mailto:sergey.livanov@ukrpost.net]
EE> Sent: Saturday, May 10, 2003 8:42 PM
EE> To: struts-user@jakarta.apache.org
EE> Subject: RE i18n, EREZ
EE> Thank you Erez, I've put
EE> try { request.setCharacterEncoding...
EE> }
EE> catch {
EE> UnsupportedEncodingException ...
EE> }
EE> code in Action class but the error occur again !!!
EE> Sergey .
EE> --
EE> Укрпост - продвинутая почта. http://www.ukrpost.net/
EE> IMAP POP3 NNTP RSSNews Unicode.
EE>
---------------------------------------------------------------------
EE> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
EE> For additional commands, e-mail: struts-user-help@jakarta.apache.org
--
Best regards,
Sergey.Livanov
mailto:Sergey.Livanov@ukrpost.net
--
Укрпост - продвинутая почта. http://www.ukrpost.net/
IMAP POP3 NNTP RSSNews Unicode.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org