J2EE Default Encoding Specification (Since WebLogic Serv

本文介绍如何通过weblogic-application.xml文件为整个J2EE企业应用设置默认字符编码,包括请求和响应的编码方式,并提供了使用示例。

J2EE Default Encoding Specification (Since WebLogic Server 7.0)

With weblogic-application.xml, it has become possible to specify the default character encoding for requests and responses for the entire J2EE enterprise application. (CR065921)

By setting either of the following parameters for weblogic-application.xml, the default encoding used for requests and responses can be set.

  • webapp.encoding.usevmdefault = true | false
  • webapp.encoding.default = java encoding name

Note: The value specified with webapp.encoding.default is the Java encoding name, not the IANA character set name.

If the above two options are both set, webapp.encoding.usevmdefault is used.

These response and request values can be set individually. Also, these options are only applied to response and request, and are not applied to the encoding read during JSP compilation. For details on how to set response and request individually, as well as JSP file encoding, see programming .

Code List 1-1: Usage Example of webapp.encoding.usevmdefault (weblogic-application.xml)


<application-param>

  <description>webapp.usevmdefault</description>

  <param-name>webapp.encoding.usevmdefault</param-name>

  <param-value>true</param-value>

</application-param>

Alternately

Code List 1-4: Usage Example of weblogic_application.xml's webapp.encoding.default


<application-param>

  <description>default encoding</description>

  <param-name>webapp.encoding.default</param-name>

  <param-value>SJIS</param-value>

</application-param>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值