Tomcat和Weblogic部署纯html文件
生活随笔
收集整理的這篇文章主要介紹了
Tomcat和Weblogic部署纯html文件
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1、首先純html文件,得有一個(gè)入口 index.html
2、Tomcat是不需要指定web.xml的,因?yàn)榧词鼓愕奈募餂]有web.xml,也會(huì)讀取conf 目錄下的web.xml,在這個(gè)文件里邊指定了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的話, 可以直接發(fā)布war包,但是如果想要發(fā)布純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/javaeehttp://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>?
原創(chuàng)文章,歡迎轉(zhuǎn)載,轉(zhuǎn)載請(qǐng)注明出處!
?
轉(zhuǎn)載于:https://www.cnblogs.com/acm-bingzi/p/tomcathtml.html
總結(jié)
以上是生活随笔為你收集整理的Tomcat和Weblogic部署纯html文件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jsp内置对象(四)-----sessi
- 下一篇: 个人作业5——软工个人总结