2022-11-24 378
1、首先纯html文件,得有一个入口 index.html
2、Tomcat是不需要指定web.xml的,因为即使你的文件里没有web.xml,也会读取conf 目录下的web.xml,在这个文件里边指定了index.html的入口
Tomcat的话只要将原文件部署到 webapps\ 目录下,或者在\conf\Catalina\localhost 目录下新建xml文件,指向html页面
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:\Users\jiashubing\Desktop\dist"
reloadable="false" privileged="true" antiResourceLocking="false" antiJARLocking="false">
</Context>
3、如果是Weblogic的话, 可以直接发布war包,但是如果想要发布纯html文件,必须要新建WEB-INF\web.xml 文件,否则无安装部署
web.xml 文件的写法也很简单,注意格式,不要有中文字符
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<welcome-file-list>
<welcome-file>index</welcome-file>
</welcome-file-list>
<!--或者写成这种形式-->
<!--<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>-->
</web-app>
以上所述是小编给大家介绍的Tomcat和Weblogic部署纯html文件过程解析,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对77isp云服务器技术网的支持!
原文链接:https://77isp.com/post/16264.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态