Websphere - Set content type/charset of external resource

柔情痞子 提交于 2019-12-11 08:15:56

问题


I have mapped static content (html) to external directory. When I request html file over HTTP, it returned content type/charset Windows-874.

Content-Type:text/html; charset=Windows-874

I would like to change it to

Content-Type:text/html; charset=UTF-8

How can I change it in 'ibm-web-ext.xml'? Or I have to change it in other configurations of Websphere?

Here is my ibm-web-ext.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-ext
   xmlns="http://websphere.ibm.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
      version="1.0">
   <file-serving-attribute name="extendedDocumentRoot" value="D:/XXX/content/" />

   <reload-interval value="3"/>
   <auto-encode-requests value="false"/>
   <auto-encode-responses value="false"/>
   <enable-directory-browsing value="false"/>
   <enable-file-serving value="true"/>
   <pre-compile-jsps value="false"/>
   <enable-reloading value="true"/>
   <enable-serving-servlets-by-class-name value="false" />  
</web-ext>

来源:https://stackoverflow.com/questions/25662426/websphere-set-content-type-charset-of-external-resource

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!