当前位置: 首页 > news >正文

顺德做网站的公司海南网站建设公司哪家好

顺德做网站的公司,海南网站建设公司哪家好,企业品牌推广宣传方案,沈阳建设信息网应用场景&#xff1a;在遇到中文问题时&#xff0c;常需要通过设置编码格式来解决问题。下面介绍TongWeb8的编码设置及优先级。一、web.xml中请求、响应编码的配置优先级最高在JavaEE8规范中web.xml增加了request, response编码配置&#xff0c;该配置优先级最高。<?xml ve…

应用场景:

在遇到中文问题时,常需要通过设置编码格式来解决问题。下面介绍TongWeb8的编码设置及优先级。

一、web.xml中请求、响应编码的配置优先级最高

在JavaEE8规范中web.xml增加了request, response编码配置,该配置优先级最高。

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://xmlns.jcp.org/xml/ns/javaee"xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"id="WebApp_ID" version="4.0"><display-name>charset</display-name><default-context-path>/testde</default-context-path><request-character-encoding>GBK</request-character-encoding><response-character-encoding>GBK</response-character-encoding>  

以往项目中request, response编码通常通过filter来设置,如:

    <filter-name>EncodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>UTF-8</param-value></init-param><init-param><param-name>forceEncoding</param-name><param-value>true</param-value></init-param>

二、TongWeb8控制台编码设置

在部署应用时通过配置"编码"来完成。

参数

参数说明

应用请求编码

应用程序的默认 HTTP 请求编码,优先级低于web.xml。

应用响应编码

应用程序的默认HTTP响应体编码,优先级低于web.xml。

JSP 文件编码

指定 JSP 文件编码, 相当于javaEncoding。

静态文件编码

使用指定的编码解析应用的文件资源,如 *.html 等静态资源,可用于解决文件编码和 JVM 默认编码不一致引起的乱码问题。相当于fileEncoding

三、URL编码设置

为兼容tomcat编码,http通道中"其它" 中的"URI 编码" 相当于tomcat的URIEncoding ;“URI 使用 Content-Type 解码" 相当于tomcat的useBodyEncodingForURI。

若tomcat下不乱码,而在TongWeb下乱码,则可参考tomcat配置来配置TongWeb。

URIEncoding : This specifies the character encoding used to decode the URI bytes, after %xx decoding the URL. The default value is UTF-8.

useBodyEncodingForURI :
This specifies if the encoding specified in contentType should be used for URI query parameters, instead of using the URIEncoding. This setting is present for compatibility with Tomcat 4.1.x, where the encoding specified in the contentType, or explicitly set using Request.setCharacterEncoding method was also used for the parameters from the URL. The default value is false.
Notes: 1) This setting is applied only to the query string of a request. Unlike URIEncoding it does not affect the path portion of a request URI. 2) If request character encoding is not known (is not provided by a browser and is not set by SetCharacterEncodingFilter or a similar filter using Request.setCharacterEncoding method), the default encoding is always "ISO-8859-1". The URIEncoding setting has no effect on this default.

http://www.yayakq.cn/news/584782/

相关文章:

  • 上海市区网站设计制作公司高端网站设计公司名单
  • 怎么做娱乐电玩网站wordpress newsletter 插件
  • 江门网站上排名网络规划设计师正高级任职资格
  • 江苏常州青之峰做网站罗湖网站建设58
  • 农产品电子商务网站建设企业网站建设方案投标书
  • 做空间的网站吗福山区建设工程质量检测站网站
  • 网站seo优化8888网站域名更改
  • 使用iis6搭建网站网络规划设计师可以同时报名吗
  • 网站屏幕自适应桂林象鼻山夜景
  • 上传文档网站开发宣城网站建设价格
  • 网站建设赛车网站建设皖icp
  • 站外引流推广渠道技能培训网
  • 潍坊网站优化公司哪家好营销方案策划书怎么写
  • 那些网站可以做海报搜索引擎网站推广可以自己做吗
  • 元谋县建设局网站住建网查询资质
  • 免费域名做网站化妆品 网站模板
  • 织梦新手网站建设怎么样自己做网站赚钱年入40万
  • 北京电力建设公司网站哪里有微信网站建设
  • 网站搭建php源码网站系统定制
  • 定兴做网站网站被人恶意刷流量
  • 深圳住房和建设局网站预约万户网
  • 无锡画室网站建设设计制作心得体会
  • 如何做不同域名跳转同一个网站南屏网站建设
  • 站内搜索本网站怎么做云服务器 虚拟机
  • 如何建设线报网站医疗器械类网站前置审批材料模板
  • 初中毕业学网站开发工程师做的烂的网站
  • 电子商务网站建设与管理试题及答案wordpress用户留言插件
  • 中端网站建设网站绿标怎么做
  • wordpress连接谷歌地图丽水网站建设seo
  • 企业宣传标语西安网站seo哪家公司好