Hi,
I use JBOSS-4.0.2.
My application is struts based.
When my action class receives form parameters, the request is not able to
handle unicode characters.
The unicode characters are getting displayed as some junk characters.
I searched weba and everywhere it is written that
"request.setCharacterEncoding("UTF-8")" should solve the problem. But strangely
it's not working.
I tried even with Tomcat5.0. Here is the JSP file I wrote to test unicode
characters.
JSP:
|
| <[EMAIL PROTECTED] contentType="text/html;charset=utf-8"
pageEncoding="utf-8" import="java.io.*" %>
| <%
| String enc = request.getCharacterEncoding();
| if (enc == null)
| {
| request.setCharacterEncoding("UTF-8");
|
| }
| String characters = request.getParameter("str");
| out.println(characters);
|
| %>
|
Even the above code is not able to handle unicode characters with tomcat 5.0.
If I set URLENCODING attribute of CONNECTOR element in server.xml , then tomcat
is able to handle encoding properly.
But when I set URLENCODING attribute of JBOSS_TOMCAT's SERVER.XML, it is not
able to handle unicode characters. I mean, when I pass unicode character from
form, and if I read using "request.getParameter(
"str") " it gives me junk characters in place of unicode character.
Effectively, there is no way that I can get unicode characters from request in
my JBOSS application.
Please hlep me how I can solve this problem.,
Ravi Prakash
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3930296#3930296
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3930296
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user