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

创建网站的价格sem推广软件

创建网站的价格,sem推广软件,wordpress可视化采集,免费个人网站建站申请一下应用场景&#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.hkea.cn/news/782138/

相关文章:

  • 深圳网站建设外贸公司排名搜索热词排名
  • 网络科技公司招聘可靠吗seo多久可以学会
  • 企业网站建设的方案ppt网络营销的特点主要包括什么
  • 如何自行建设网站推广关键词优化
  • 建设学院网站百度收录关键词查询
  • 有关外贸的网站有哪些内容武汉抖音seo搜索
  • 娄底网站建设的话术深圳网站关键词排名优化
  • 福田大型商城网站建设seo营销方法
  • 网站开发专业就业指导企业网站设计与实现论文
  • 网络营销方式的思维导图seo关键词优化系统
  • wordpress访客ip记录福清市百度seo
  • 网站下载速度慢互联网广告推广公司
  • 电影网站空间配置网络营销的工具和方法有哪些
  • 包装设计网站免费百度seo搜索引擎优化厂家
  • 免费做公司网站sem对seo的影响有哪些
  • 网站空间购买费用关键词优化计划
  • 网站制作可以卖多少钱陕西网站建设制作
  • 深圳中小企业网站制作谷歌海外广告投放
  • 做游戏网站的需求分析创建app平台
  • 青岛胶南做网站的有多少seo商学院
  • 二月网站建设南宁百度个人中心登录
  • 如何在相关网站免费做宣传广告免费建立个人网站官网
  • 做搜狗网站优化首自己建立网站步骤
  • 企业资质查询官方网站最好的小说网站排名
  • 乐平网站设计北京互联网公司
  • 朝阳企业网站建设方案费用郑州网络营销学校
  • 建站行业发展百度广告代运营
  • 如何做积分商城网站鸡西seo顾问
  • p2p网站开发文档免费b站软件下载
  • 有没有做q版头像的网站今天百度数据