進階自訂 > 將 ThingWorx 伺服器配置為與 ThingView 小器具搭配使用
  
將 ThingWorx 伺服器配置為與 ThingView 小器具搭配使用
ThingView 小器具使用 WebAssembly 技術來顯示 3D 圖形。當您在瀏覽器中檢視 3D 資料時,瀏覽器會下載 ThingView WebAssembly 檔案。欲在瀏覽器中優化 WebAssembly 檔案的下載與初始化,請針對 WebAssembly MIME 類型配置服務器。
欲配置 Apache Tomcat 伺服器,請編輯 web.xmlserver.xml 檔案。
1. 開啟 <Apache_Tomcat_Installation>/conf/web.xml 檔案以進行編輯。請確保此檔案包含下列程式碼:
<mime-mapping>
<extension>wasm</extension>
<mime-type>application/wasm</mime-type>
</mime-mapping>
2. 開啟 <Apache_Tomcat_Installation>/conf/server.xml 檔案以進行編輯。請確保 compressableMimeType 屬性包含 application/wasm MIME 類型,如下列範例所示:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
redirectPort="8445"
compression="on"
compressionMinSize="1024"
compressableMimeType="application/wasm,text/html,text/xml,text/plain,text/css,text/javascript,application/javascript"/>