[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - I have a problem with character display when convert from We
chicken
do-not-reply at jboss.com
Tue Feb 3 03:20:54 EST 2009
Dear all
I am convert a web application from Weblogic to JBoss 4.3.0.
now I can not display character correctly.
I try to make a servlet it gets charset value from charset parameter and displays a java string in corresponding char set:
public void doPost(HttpServletRequest request, HttpServletResponse response)
| throws ServletException, IOException {
|
| if (true) {
| String cs = request.getParameter("charset");
| System.out.println("CS. : " + cs);
| response.setContentType("text/html; charSet=" + cs);
| response.setHeader("Content-Type", "text/html; charSet=" + cs);
| PrintWriter out1 = response.getWriter();
| String tmp = "some Korean characters: ÃÂÃÂÃÂìÃÂôêòÃÂìÃÂôÃÂÃÂø êòðìàà";
| out1.println(tmp);
|
| return;
| }
| }
I tested the sevlet with different input char set: UTF-8, EUC-KR, ... but I did not success!
if you have experience with this problem, please give me some suggestions to solve it.
Thank in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206448#4206448
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206448
More information about the jboss-user
mailing list