当前位置: 移动技术网 > IT编程>网页制作>HTML > Tomcat和Weblogic部署纯html文件过程解析

Tomcat和Weblogic部署纯html文件过程解析

2020年09月26日  | 移动技术网IT编程  | 我要评论
1、首先纯html文件,得有一个入口 2、tomcat是不需要指定web.xml的,因为即使你的文件里没有web.xml,也会读取conf 目录下的web.xml,在这个文件里边指

1、首先纯html文件,得有一个入口

2、tomcat是不需要指定web.xml的,因为即使你的文件里没有web.xml,也会读取conf 目录下的web.xml,在这个文件里边指定了的入口

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></welcome-file>
   <welcome-file>index.htm</welcome-file>
   <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>-->

</web-app>

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网