Some Issues with Multi-byte Charset in Sun Java System Application Server 9.0

Users have reported some issues with multi-byte charset in Sun Java System Application Server (SJSAS)9.0, multi-language edition. In this post, I will summarize 2 such issues and their resolutions. Note that these issues do not exist in JavaEE SDK 5, which is not localized, nor in SJSAS installations with ASCII charset.

1. Log messages and output from verifier are not properly encoded.

This happens when a user runs $SJSAS_HOME/bin/verifier tool, or use $SJSAS_HOME/bin/asadmin command to deploy any apps or modules with --verify=true flag, or use web admin gui to deploy apps or modules with verify option checked. This bug affects SJSAS 9.0 on Windows, Solaris and Linux with multi-byte charset. In a typical chinese machine, the relevant log entries in $SJSAS_HOME/domains/domain1/logs/server.log shows this:


[#|2006-08-16T11:08:40.229-0400|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.tools.avk.tools.verifier|_ThreadID=13;_ThreadName=Thread-29;_RequestID=c81d08d2-4ff0-4555-ac40-14db4a2c0795;|
          --------------------------- //START of problem
          闈欐?侀獙璇佺粨鏋?
          ---------------------------

	
	 ----------------------------------
	 鏁呴殰/璀﹀憡/閿欒鏁扮洰
	 ----------------------------------
	 澶辫触娆℃暟: 0
         璀﹀憡鏁扮洰: 0
	 閿欒鏁扮洰: 0
        
          ----------------------------------
          闈欐?侀獙璇佺粨鏋滅殑缁撳熬
          ----------------------------------//END of problem
    |#]

[#|2006-08-16T11:08:40.229-0400|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.avk.tools.verifier|_ThreadID
=13;_ThreadName=Thread-29;|未在归档文件中找到错误。|#]

[#|2006-08-16T11:08:40.419-0400|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=13;_ThreadName=Thread-29;|deployed
with moduleid = hello|#]

[#|2006-08-16T11:08:41.180-0400|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID
=14;_ThreadName=httpWorkerThread-4848-0;hello;server;/hello;|WEB0100:正在位于
[/hello] 的虚拟服务器 [server] 中加载 Web 模块 [hello]|#]
This issue was reported as glassfish issue 938, and 782, and also discussed on China Sun Developer Network forum.

According to the glassfish issue tracker, this fix for this issue has already been checked in, and targeted for SJSAS 9.0 update release 1.

2. Web apps with URIs of Multiple-byte characters

This problem occurs when you use any multi-byte characters (e.g., Chinese, Japanese, Korean, etc) in href links, JSP file names and paths. A user first reported this bug in NetBeans:


sniplet of code:
        link1
         link2
(first href contains multibyte characters - such a file exists in my project)
but when i execute my project and click on link1 it fails:
The requested resource () is not available.
link in web browser is correct:
http://localhost:8080/__Jot_WebApplication4__/とppと.jsp
all works fine for link2.

Glassfish issue 797 contains more details about the resolution, which is also targeted for SJSAS 9.0 update release 1. You may also want to try the glassfish milestone builds that includes those fixes.

To enable this functionality on a per-HTTP-listener basis, users need to add a uriEncoding property to the target http listener in $SJSAS_HOME/domains/domain1/config/domain.xml:


<http-listener port="8080" ...>
    <property name="uriEncoding" value="UTF-8"/>
</http-listener>

Comments:

ds

Posted by guest on June 22, 2009 at 11:56 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Cheng Fang

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today