Apache for Linux 下使用htc组件问题

系统环境:Linux RedHat AS5.0+Apache 2.2(端口7001)+WebLogic9.2(端口8002、8003、8004)

WebLogic 为集群布署,由Apache做代理服务器。结果直接访问WebLogic服务器的htc文件能够正常访问(如:在IE栏输入 http://192.168.0.9:8002/test/test.htc,可以获取到文件,提示下载),但如果通过Apache访问则显示空白,什么也没有(如:在IE栏输入http://192.168.0.9:7001/test/test.htc,显示空白,同时鼠标右键无用)。


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

------------------------------------------------

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>


---------------------微软--------------------------

http://support.microsoft.com/kb/306231

相关推荐