[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Encoding problem -- looks like a bug

2005-09-26 Thread sunpy
I created a simple WAR after seeing your reply, and it seems to work without 
having to do the encoding conversion. Now I kind of suspect the problem was 
caused by Struts, as the application in my first question was built with 
Struts. I have sent the application to your email, really appreciate your help. 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3897146#3897146

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3897146


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - Encoding problem -- looks like a bug

2005-09-21 Thread sunpy
I have a very basic webapp built with struts, basically it reads Chinese 
characters and saves them in a database. The main servlet looks like this:

  | request.setCharacterEncoding("UTF-8");
  | 
  | String inputTex =  form.getEnteredText();
  | 
  | 
  | 
The content header of input JSP was set to 'charset = "UTF-8". But the 
characters saved in the DB was all question marks. After fiddling for days, I 
added a statement like this: 
inputTex = new String(inputTex.getBytes("ISO-8859-1"), "UTF-8");
and now everything works fine. It looks like JBoss would use ISO-8859-1 no 
matter whatever is set in the request. Beside getting input value from a form 
bean, I also tried getting it directly with
inputTex = request.getParameter("input");
and everything is same. The JBoss version I use is 4.0.1sp1. I saw similiar 
problem reported by others using search, but no one gave a definitive answer. 
Is this a bug?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3896198#3896198

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3896198


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user