Apache for Linux 下使用htc组件问题

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>

转载于:https://www.cnblogs.com/josson/archive/2005/10/25/262121.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值