Tomcat 配置wap开发环境

tomcat5.0的版本一般都已经对wml支持了,如果不支持的话,修改CATALINA_HOME/conf/web.xml。
在MIME映射部分添加如下内容:
<mime-mapping>
<!-- WML Source -->
<extension>wml</extension>
<mime-type>text/vnd.wap.wml</mime-type>
</mime-mapping>
<mime-mapping>
<!-- Compiled WML -->
<extension>wmlc</extension>
<mime-type>application/vnd.wap.wmlc</mime-type>
</mime-mapping><mime-mapping>
<!-- WML Script Source -->
<extension>wmls</extension>
<mime-type>text/vnd.wap.wmlscript</mime-type>
</mime-mapping>
<mime-mapping>
<!-- Compiled WML Script -->
<extension>wmlscriptc</extension>
<mime-type>application/vnd.wap.wmlscriptc</mime-type>
</mime-mapping>
还可以在welcome-list里面添加index.wml作为默认的访问页面
<welcome-file-list>
<welcome-file>index.wml</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
这样服务器已经可以用来开发wap应用了。

 

你可能感兴趣的:(tomcat,WAP)