You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Kiran Kumar <mk...@yahoo.com> on 2004/04/23 20:23:19 UTC
Multibyte string Tomcat ,struts IE
Hi All,
I need help on sending multibyte characters in URL
using html:link , we are following the steps mentioned
below
i have searched for the information on google but
could not come across anything helpful ,
(it is also mentioned in some post that IE adds its
own encoding when the data is submitted and that
browsers do not send the character encoding in "real
life")
hope someone on this list can help me out
1.Is is possible to send multibyte string in url
(using HTTP GET method) ?
2.If we have to encode the String what are the ways
that i can do the same and how do i decode the string
?
3. Is there any javascript which takes the query
string and submits it as POST method
Steps we Use
1. EUC-JP string taken from postgres database
(database encoding is in EUC-JP),
2. The string is put in hashmap as well as a
ActionForm
3. In jsp page we use
<html:link action ="/myaction.do" name =
"reporterList" property = "reporterListMap" >
<bean:write name="reporterList" property="reporter"/>
</html:link>
Here the string is displayed properly
when we click on this link the EUC-JP string is
encoded and sent to the next action
when the string is accessed in action class it is
malformed
We have a setcharacterencoding filter (tomcat) that
has encoding as EUC_JP
We have tried
eucString = Actionform.getstring();
byte[] stringBytesISO =
eucString.getBytes("ISO-8859-1");
eucString = new String(stringBytesISO, "EUC-JP");
But this works perfectly if we use a POST method but
not on GET
Version We Use
Tomcat 4.1.27
Struts 1.1
Looking forward for your replies
Thanks,
Kiran
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org