Apache for Linux 下使用htc組件問題

來源:互聯網
上載者:User
HTC (HTML Component) HTML組件——從5.5版本開始,Internet Explorer(IE)開始支援Web
行為的概念。這些行為是由尾碼名為.htc的指令檔描述的,它們定義了一套方法和屬性,程式員幾乎可以把這些方法和屬性應用到HTML頁面上的任何元素上去。採用HTC帶來的好處是巨大的。但是由於
HTC 是 Microsoft 提出的技術。

RESOLUTION

You can resolve the problem on the Apache Web server side if you add
the correct MIME type for the HTC behavior with the following command:

AddType text/x-component .htc

If the command AddType is not found or is not available, follow these
steps to add the MIME type text/x-component for the .htc file manually
to the Apache Web server.
1. Locate the directory /Etc/apache/.

2. Open the file Mime.types.

3. Add the following line to the file: text/x-component htc

4. Save and close the file.
5. Restart the Apache Web server. The Mime.types file is reloaded after you type: /usr/apache/bin/apachectl restart

STATUS

註:Linux AS4預設的apache,配置了MIME類型也無法正常使用.htc組件,建議使用原始碼編譯安裝。

另外:weblogic、WebSphere 中無法正常使用htc組件
*** 解決方案則是在 WebApp 的 web.xml
中加入以下幾行
<mime-mapping>
<extension>htc</extension>
<mime-type>text/x-component</mime-type>
</mime-mapping>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.