Glassfish编码 [英] Glassfish encoding

查看:112
本文介绍了Glassfish编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此示例中的代码例如和runUpdate()函数,我把它放在Netbeans 6.8的Web应用程序中的一个javabean中,使用Glassfish v3。
似乎我有一个编码问题,因为问号出现在表格中。



到目前为止我尝试过:


  1. 在nbproject-> private-> private.properties中添加runtime.encoding = UTF-8>

  2. 在project-> properties-> sources - >编码utf-8

  3. 在netbeans_default_options的netbeans-> etc-> netbeans_conf中添加-J-DFile.encoding = UTF-8
  4. 在sun-web.xml中,我添加了 在项目 - >属性 - >构建 - >编译 - >其他编译器选项中 - 编码utf-8
  5. < 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:

  1. In nbproject->private->private.properties add runtime.encoding=UTF-8>
  2. In project->properties->sources->encoding utf-8
  3. In program files->netbeans->etc->netbeans_conf in netbeans_default_options i add -J-DFile.encoding=UTF-8
  4. In project->properties->build->compiling->additional compiler options -encoding utf-8
  5. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆