Glassfish编码 [英] Glassfish encoding
问题描述
我使用此示例中的代码例如和runUpdate()函数,我把它放在Netbeans 6.8的Web应用程序中的一个javabean中,使用Glassfish v3。
似乎我有一个编码问题,因为问号出现在表格中。
到目前为止我尝试过:
- 在nbproject-> private-> private.properties中添加runtime.encoding = UTF-8>
- 在project-> properties-> sources - >编码utf-8
- 在netbeans_default_options的netbeans-> etc-> netbeans_conf中添加-J-DFile.encoding = UTF-8
- 在sun-web.xml中,我添加了
在项目 - >属性 - >构建 - >编译 - >其他编译器选项中 - 编码utf-8
< locale-charset-info default-locale =UTF-8>
< locale-charset-map locale =charset =/>
< parameter-encoding default-charset =UTF-8/>
< / locale-charset-info>
当我使用system.out .print()在glassfish输出面板中,我得到了乱码。
我在疯狂的最后一级,请看一看。
谢谢。
编辑
当我列出.5时,我得到一个glassfish错误:
警告:WEB0500:locale-charset-info元素的default-locale属性被忽略
Glassfish使用ISO-8859-1编码。默认情况下,Glassfish使用ISO-8859-1编码。请参阅 http://download.oracle.com/ docs / cd / E19798-01 / 821-1752 / beafu / index.html 以获取更多信息。
I'm using the code in this example example and in the runUpdate() function which i put in a javabean in a web application in Netbeans 6.8 with Glassfish v3. It seems i have an encoding problem because question marks appear in the table.
I have tried so far:
- In nbproject->private->private.properties add runtime.encoding=UTF-8>
- In project->properties->sources->encoding utf-8
- In program files->netbeans->etc->netbeans_conf in netbeans_default_options i add -J-DFile.encoding=UTF-8
- In project->properties->build->compiling->additional compiler options -encoding utf-8
- In sun-web.xml i added
<locale-charset-info default-locale="UTF-8"> <locale-charset-map locale="" charset=""/> <parameter-encoding default-charset="UTF-8"/> </locale-charset-info>
Also when i use system.out.print() in the glassfish output panel i get gibberish. I'm in the last level of madness please take a look. Thank you.
EDIT Also when i do listing .5 i get a glassfish error:
WARNING: WEB0500: default-locale attribute of locale-charset-info element is being ignored
解决方案Glassfish uses ISO-8859-1 encoding by default. See http://download.oracle.com/docs/cd/E19798-01/821-1752/beafu/index.html for more information.
这篇关于Glassfish编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!